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.
-
BORDER_2D
-
-
BORDER_IN
-
-
BORDER_OUT
-
-
IN
-
-
NONE
-
-
OUT
-
-
BorderedComponent(Component)
- Create an object to border a Component.
-
BorderedComponent(Component, int)
- Create an object to border a Component and make it the
given width (applies to 2D borders only).
-
getBorderWidth()
-
-
paint(Graphics)
-
-
reshape(int, int, int, int)
-
-
resizeToChild()
- Resize the parent border to the current size of it's child
plus the required border width and padding area.
-
setBorderColor(Color)
- The color of the border (applies to 2D borders only).
-
setBorderStyle(int)
- Set the style of the border.
-
setBorderWidth(int)
- The width of the border (applies to 2D borders only).
-
setPadding(int)
- The space, in pixels, between the border and Component (the
default is 0).
-
setPaddingColor(Color)
- The color to paint the padding are between the border and
Component (the default is the background color).
-
update(Graphics)
-
NONE
public final static int NONE
IN
public final static int IN
OUT
public final static int OUT
BORDER_IN
public final static int BORDER_IN
BORDER_OUT
public final static int BORDER_OUT
BORDER_2D
public final static int BORDER_2D
BorderedComponent
public BorderedComponent(Component c)
- Create an object to border a Component.
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).
setBorderStyle
public void setBorderStyle(int m)
- Set the style of the border. One of:
NONE, IN, OUT, BORDER_IN, BORDER_OUT or BORDER_2D.
setPadding
public void setPadding(int p)
- The space, in pixels, between the border and Component (the
default is 0).
setPaddingColor
public void setPaddingColor(Color c)
- The color to paint the padding are between the border and
Component (the default is the background color).
setBorderWidth
public void setBorderWidth(int p)
- The width of the border (applies to 2D borders only).
setBorderColor
public void setBorderColor(Color c)
- The color of the border (applies to 2D borders only).
update
public void update(Graphics g)
- Overrides:
- update in class Component
paint
public void paint(Graphics g)
- Overrides:
- paint in class Component
getBorderWidth
public int getBorderWidth()
resizeToChild
public void resizeToChild()
- Resize the parent border to the current size of it's child
plus the required border width and padding area.
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