Class spt.gui.BorderedComponent
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class spt.gui.BorderedComponent

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----spt.gui.BorderedComponent

public class BorderedComponent
extends Panel
Draws a border arround any Component. Six styles are supported: inset, raised, border etched-in, border raised, 2D and no border.

Variable Index

 o BORDER_2D
 o BORDER_IN
 o BORDER_OUT
 o IN
 o NONE
 o OUT

Constructor Index

 o BorderedComponent(Component)
Create an object to border a Component.
 o BorderedComponent(Component, int)
Create an object to border a Component and make it the given width (applies to 2D borders only).

Method Index

 o getBorderWidth()
 o paint(Graphics)
 o reshape(int, int, int, int)
 o resizeToChild()
Resize the parent border to the current size of it's child plus the required border width and padding area.
 o setBorderColor(Color)
The color of the border (applies to 2D borders only).
 o setBorderStyle(int)
Set the style of the border.
 o setBorderWidth(int)
The width of the border (applies to 2D borders only).
 o setPadding(int)
The space, in pixels, between the border and Component (the default is 0).
 o setPaddingColor(Color)
The color to paint the padding are between the border and Component (the default is the background color).
 o update(Graphics)

Variables

 o NONE
  public final static int NONE
 o IN
  public final static int IN
 o OUT
  public final static int OUT
 o BORDER_IN
  public final static int BORDER_IN
 o BORDER_OUT
  public final static int BORDER_OUT
 o BORDER_2D
  public final static int BORDER_2D

Constructors

 o BorderedComponent
  public BorderedComponent(Component c)
Create an object to border a Component.
 o BorderedComponent
  public BorderedComponent(Component c,
                           int border)
Create an object to border a Component and make it the given width (applies to 2D borders only).

Methods

 o setBorderStyle
  public void setBorderStyle(int m)
Set the style of the border. One of: NONE, IN, OUT, BORDER_IN, BORDER_OUT or BORDER_2D.
 o setPadding
  public void setPadding(int p)
The space, in pixels, between the border and Component (the default is 0).
 o setPaddingColor
  public void setPaddingColor(Color c)
The color to paint the padding are between the border and Component (the default is the background color).
 o setBorderWidth
  public void setBorderWidth(int p)
The width of the border (applies to 2D borders only).
 o setBorderColor
  public void setBorderColor(Color c)
The color of the border (applies to 2D borders only).
 o update
  public void update(Graphics g)
Overrides:
update in class Component
 o paint
  public void paint(Graphics g)
Overrides:
paint in class Component
 o getBorderWidth
  public int getBorderWidth()
 o resizeToChild
  public void resizeToChild()
Resize the parent border to the current size of it's child plus the required border width and padding area.
 o reshape
  public synchronized void reshape(int x,
                                   int y,
                                   int w,
                                   int h)
Overrides:
reshape in class Component

All Packages  Class Hierarchy  This Package  Previous  Next  Index