All Packages Class Hierarchy This Package Previous Next Index
Class COM.taligent.widget.BorderPanel
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----java.awt.Panel
|
+----COM.taligent.widget.BorderPanel
- public class BorderPanel
- extends Panel
Various graphical borders. The border itself is a Panel so that
it can contain other Components (i.e. it borders something). You
use the BorderPanel like any other Panel: you set the layout that
you prefer and add Components to it. Beware that a null layout
does not obey the insets of the panel so if you use null layouts,
adjust your measurements to handle the border by calling insets().
-
CENTER
- Center alignment.
-
DEFAULT_ALIGNMENT
- Default alignment (LEFT).
-
DEFAULT_COLOR
- Default color (black).
-
DEFAULT_FONT
- Default font (TimesRoman,PLAIN,14).
-
DEFAULT_GAP
- Default gap between border and contained component (5).
-
DEFAULT_IN_THICKNESS
- Default thickness for etched-in borders (10).
-
DEFAULT_LOWERED_THICKNESS
- Default thickness for lowered borders (2).
-
DEFAULT_OUT_THICKNESS
- Default thickness for etched-out borders (10).
-
DEFAULT_RAISED_THICKNESS
- Default thickness for raised borders (2).
-
DEFAULT_SOLID_THICKNESS
- Default thickness for solid borders (4).
-
DEFAULT_STYLE
- Default style (IN).
-
DEFAULT_THICKNESS
- Default thickness (10).
-
IN
- An etched in border.
-
LEFT
- Left alignment.
-
LOWERED
- A lowered border.
-
OUT
- An etched out border.
-
RAISED
- A raised border.
-
RIGHT
- Right alignment.
-
SOLID
- Solid border.
-
BorderPanel()
- Constructor.
-
BorderPanel(Color, int)
- Constructor.
-
BorderPanel(int)
- Constructor.
-
BorderPanel(int, int)
- Constructor.
-
BorderPanel(String)
- Constructor.
-
getAlignment()
- Gets the text alignment.
-
getColor()
- Gets the current color for SOLID borders and the caption
text color for etched borders.
-
getGap()
- Gets the gap between the border and the contained Component.
-
getStyle()
- Gets the style of the border
-
getText()
- Gets the text.
-
getTextFont()
- Gets the font of the text.
-
getThickness()
- Gets the thickness of the border.
-
insets()
- Returns the insets of this panel..
-
paint(Graphics)
- Repaints the border.
-
setAlignment(int)
- Sets the text alignment.
-
setColor(Color)
- Sets the current color for SOLID borders and the caption text
color for etched borders.
-
setGap(int)
- Sets the gap between the border and the contained Component.
-
setStyle(int)
- Sets the style of the border
-
setText(String)
- Sets the text.
-
setTextFont(Font)
- Sets the font.
-
setThickness(int)
- Sets the thickness of the border.
-
toString()
- Returns the settings of this BorderPanel instance as a string.
SOLID
public static final int SOLID
- Solid border.
RAISED
public static final int RAISED
- A raised border.
LOWERED
public static final int LOWERED
- A lowered border.
IN
public static final int IN
- An etched in border.
OUT
public static final int OUT
- An etched out border.
LEFT
public static final int LEFT
- Left alignment.
CENTER
public static final int CENTER
- Center alignment.
RIGHT
public static final int RIGHT
- Right alignment.
DEFAULT_STYLE
public static final int DEFAULT_STYLE
- Default style (IN).
DEFAULT_THICKNESS
public static final int DEFAULT_THICKNESS
- Default thickness (10).
DEFAULT_SOLID_THICKNESS
public static final int DEFAULT_SOLID_THICKNESS
- Default thickness for solid borders (4).
DEFAULT_RAISED_THICKNESS
public static final int DEFAULT_RAISED_THICKNESS
- Default thickness for raised borders (2).
DEFAULT_LOWERED_THICKNESS
public static final int DEFAULT_LOWERED_THICKNESS
- Default thickness for lowered borders (2).
DEFAULT_IN_THICKNESS
public static final int DEFAULT_IN_THICKNESS
- Default thickness for etched-in borders (10).
DEFAULT_OUT_THICKNESS
public static final int DEFAULT_OUT_THICKNESS
- Default thickness for etched-out borders (10).
DEFAULT_GAP
public static final int DEFAULT_GAP
- Default gap between border and contained component (5).
DEFAULT_COLOR
public static final Color DEFAULT_COLOR
- Default color (black). Applies to SOLID and etched borders.
DEFAULT_FONT
public static final Font DEFAULT_FONT
- Default font (TimesRoman,PLAIN,14). Only applies to etched borders.
DEFAULT_ALIGNMENT
public static final int DEFAULT_ALIGNMENT
- Default alignment (LEFT). Only applies to etched borders.
BorderPanel
public BorderPanel()
- Constructor. Makes default border.
BorderPanel
public BorderPanel(String text)
- Constructor. Makes an etched IN border with given text caption.
- Parameters:
- text - Text caption
BorderPanel
public BorderPanel(Color color,
int thickness)
- Constructor. Makes SOLID border with color and thickness given.
- Parameters:
- color - The color for the border.
- thickness - The thickness of the border.
BorderPanel
public BorderPanel(int style)
- Constructor. Makes a border of the given style with the default
thickness for that style.
- Parameters:
- style - The style for this border.
BorderPanel
public BorderPanel(int style,
int thickness)
- Constructor. Makes border with given style and thickness.
- Parameters:
- style - The style for this border.
- thickness - The thickness for this border.
insets
public Insets insets()
- Returns the insets of this panel..
- Overrides:
- insets in class Container
setStyle
public BorderPanel setStyle(int style)
- Sets the style of the border
- Parameters:
- style - The new style.
getStyle
public int getStyle()
- Gets the style of the border
setThickness
public BorderPanel setThickness(int thickness)
- Sets the thickness of the border.
- Parameters:
- thickness - The new thickness
getThickness
public int getThickness()
- Gets the thickness of the border.
setGap
public BorderPanel setGap(int gap)
- Sets the gap between the border and the contained Component.
- Parameters:
- gap - The new gap, in pixels.
getGap
public int getGap()
- Gets the gap between the border and the contained Component.
setColor
public BorderPanel setColor(Color color)
- Sets the current color for SOLID borders and the caption text
color for etched borders.
- Parameters:
- color - The new color.
getColor
public Color getColor()
- Gets the current color for SOLID borders and the caption
text color for etched borders.
setTextFont
public BorderPanel setTextFont(Font font)
- Sets the font. Only applies to etched borders.
getTextFont
public Font getTextFont()
- Gets the font of the text. Only applies to etched borders.
setText
public BorderPanel setText(String text)
- Sets the text. Only applies to etched borders.
- Parameters:
- text - The new text.
getText
public String getText()
- Gets the text. Only applies to etched borders.
setAlignment
public BorderPanel setAlignment(int alignment)
- Sets the text alignment. Only applies to etched borders.
- Parameters:
- alignment - The new alignment.
getAlignment
public int getAlignment()
- Gets the text alignment.
paint
public void paint(Graphics g)
- Repaints the border.
- Parameters:
- g - The graphics context.
- Overrides:
- paint in class Container
toString
public String toString()
- Returns the settings of this BorderPanel instance as a string.
- Overrides:
- toString in class Component
All Packages Class Hierarchy This Package Previous Next Index