Class symantec.itools.awt.Label3D
All Packages Class Hierarchy This Package Previous Next Index
Class symantec.itools.awt.Label3D
Object
|
+----Component
|
+----symantec.itools.awt.Label3D
- public class Label3D
- extends Component
- implements AlignStyle, BevelStyle
Creates a text string in a rectangle that has a three-dimensional visual
effect. It is usually attached to an option, box, or button.
An application or applet can change the label text string, but a user
cannot edit it.
Note: For most components, labels are usually created by specifying text
for the Label property of that component.
- Version:
- 1.1, August 5, 1997
- Author:
- Symantec
-
INDENT_ONE
- Constant indicating a drawing margin of 1 pixel around the outside of
the border.
-
INDENT_TWO
- Constant indicating a drawing margin of 2 pixels around the outside of
the border.
-
INDENT_ZERO
- Constant indicating a drawing margin of 0 pixels around the outside of
the border.
-
alignStyle
- The current text alignment style.
-
bevelStyle
- The current border bevel style.
-
borderedColor
- The border color.
-
cachedBackground
- Cached value of the background color.
-
hilightColor
- The color of border bevel hilights.
-
indent
- The amount to indent around the border: INDENT_ZERO,
INDENT_ONE, or INDENT_TWO.
-
sLabel3D
- The label text.
-
shadowColor
- The color of border bevel shawdows.
-
textColor
- The label text color.
-
symantec.itools.awt.Label3D()
- Constructs an empty Label3D with black text that is center aligned
and a raised border with zero border indent.
-
symantec.itools.awt.Label3D(String, int, int)
- Constructs a Label3D with black text, zero border indent, and the
specified text alignment and bevel styles.
-
symantec.itools.awt.Label3D(String, int, int, Color)
- Constructs a Label3D with a zero border indent and the specified attributes.
-
symantec.itools.awt.Label3D(String, int, int, int)
- Constructs a Label3D with black text and the specified attributes.
-
symantec.itools.awt.Label3D(String, int, int, Color, int)
- Constructs a Label3D with the specified attributes.
-
addPropertyChangeListener(PropertyChangeListener)
- Adds a listener for all event changes.
-
addVetoableChangeListener(VetoableChangeListener)
- Adds a vetoable listener for all event changes.
-
calculateHilightColors(Color)
- Used to calculate the hilight colors from the background color.
-
getAlignStyle()
- Gets the current alignment style.
-
getBevelStyle()
- Gets the current border style.
-
getBorderIndent()
- Gets the current border indent amount.
-
getBorderedColor()
- Gets the border color.
-
getMinimumSize()
- Returns the minimum dimensions to properly display this component.
-
getPreferredSize()
- Returns the recommended dimensions to properly display this component.
-
getText()
- Gets the current label text.
-
getTextColor()
- Gets the current label text color.
-
minimumSize()
-
-
paint(Graphics)
- Paints this component using the given graphics context.
-
preferredSize()
-
-
removePropertyChangeListener(PropertyChangeListener)
- Removes a listener for all event changes.
-
removeVetoableChangeListener(VetoableChangeListener)
- Removes a vetoable listener for all event changes.
-
setAlignStyle(int)
- Sets the text alignment style.
-
setBevelStyle(int)
- Sets the border style.
-
setBorderIndent(int)
- Sets the border indent amount.
-
setBorderedColor(Color)
- Sets the border color.
-
setText(String)
- Sets the label text.
-
setTextColor(Color)
- Sets the label text color.
INDENT_ONE
public static final int INDENT_ONE
- Constant indicating a drawing margin of 1 pixel around the outside of
the border.
INDENT_TWO
public static final int INDENT_TWO
- Constant indicating a drawing margin of 2 pixels around the outside of
the border.
INDENT_ZERO
public static final int INDENT_ZERO
- Constant indicating a drawing margin of 0 pixels around the outside of
the border.
alignStyle
protected int alignStyle
- The current text alignment style.
The value is one of: ALIGN_LEFT, ALIGN_CENTERED, or ALIGN_RIGHT.
- See Also:
- getAlignStyle, setAlignStyle, ALIGN_LEFT, ALIGN_CENTERED, ALIGN_RIGHT
bevelStyle
protected int bevelStyle
- The current border bevel style.
The value is one of: BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, or BEVEL_NONE.
- See Also:
- getBevelStyle, setBevelStyle, BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, BEVEL_NONE
borderedColor
protected java.awt.Color borderedColor
- The border color.
- See Also:
- getBorderedColor, setBorderedColor
cachedBackground
protected java.awt.Color cachedBackground
- Cached value of the background color. Used to determine if calculated colors need to be updated.
hilightColor
protected java.awt.Color hilightColor
- The color of border bevel hilights.
This color is automatically determined.
indent
protected int indent
- The amount to indent around the border: INDENT_ZERO,
INDENT_ONE, or INDENT_TWO.
- See Also:
- getBorderIndent, setBorderIndent, INDENT_ZERO, INDENT_ONE, INDENT_TWO
sLabel3D
protected java.lang.String sLabel3D
- The label text.
shadowColor
protected java.awt.Color shadowColor
- The color of border bevel shawdows.
This color is automatically determined.
textColor
protected java.awt.Color textColor
- The label text color.
- See Also:
- getTextColor, setTextColor
Label3D
public Label3D()
- Constructs an empty Label3D with black text that is center aligned
and a raised border with zero border indent.
Label3D
public Label3D(String sText,
int alignStyle,
int bevelStyle)
- Constructs a Label3D with black text, zero border indent, and the
specified text alignment and bevel styles.
- Parameters:
- sText - the label text
- alignStyle - the text alignment style: ALIGN_LEFT, ALIGN_CENTERED, or ALIGN_RIGHT
- bevelStyle - the bevel style: BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, or BEVEL_NONE
- See Also:
- ALIGN_LEFT, ALIGN_CENTERED, ALIGN_RIGHT, BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, BEVEL_NONE
Label3D
public Label3D(String sText,
int alignStyle,
int bevelStyle,
Color color)
- Constructs a Label3D with a zero border indent and the specified attributes.
- Parameters:
- sText - the label text
- alignStyle - the text alignment style: ALIGN_LEFT, ALIGN_CENTERED, or ALIGN_RIGHT
- bevelStyle - the bevel style: BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, or BEVEL_NONE
- color - the text color
- See Also:
- ALIGN_LEFT, ALIGN_CENTERED, ALIGN_RIGHT, BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, BEVEL_NONE
Label3D
public Label3D(String sText,
int alignStyle,
int bevelStyle,
int indent)
- Constructs a Label3D with black text and the specified attributes.
- Parameters:
- sText - the label text
- alignStyle - the text alignment style: ALIGN_LEFT, ALIGN_CENTERED, or ALIGN_RIGHT
- bevelStyle - the bevel style: BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, or BEVEL_NONE
- indent - the amount to indent the border: INDENT_ZERO,
INDENT_ONE, or INDENT_TWO
- See Also:
- ALIGN_LEFT, ALIGN_CENTERED, ALIGN_RIGHT, BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, BEVEL_NONE, INDENT_ZERO, INDENT_ONE, INDENT_TWO
Label3D
public Label3D(String sText,
int alignStyle,
int bevelStyle,
Color color,
int indent)
- Constructs a Label3D with the specified attributes.
- Parameters:
- sText - the label text
- alignStyle - the text alignment style: ALIGN_LEFT, ALIGN_CENTERED, or ALIGN_RIGHT
- bevelStyle - the bevel style: BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, or BEVEL_NONE
- color - the text color
- indent - the amount to indent the border: INDENT_ZERO,
INDENT_ONE, or INDENT_TWO
- See Also:
- ALIGN_LEFT, ALIGN_CENTERED, ALIGN_RIGHT, BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, BEVEL_NONE, INDENT_ZERO, INDENT_ONE, INDENT_TWO
addPropertyChangeListener
public synchronized void addPropertyChangeListener(PropertyChangeListener listener)
- Adds a listener for all event changes.
- Parameters:
- listener - the listener to add.
- See Also:
- removePropertyChangeListener
addVetoableChangeListener
public synchronized void addVetoableChangeListener(VetoableChangeListener listener)
- Adds a vetoable listener for all event changes.
- Parameters:
- listener - the listener to add.
- See Also:
- removeVetoableChangeListener
calculateHilightColors
protected void calculateHilightColors(Color c)
- Used to calculate the hilight colors from the background color.
- See Also:
- paint
getAlignStyle
public int getAlignStyle()
- Gets the current alignment style.
- Returns:
- the text alignment style: ALIGN_LEFT, ALIGN_CENTERED, or ALIGN_RIGHT
- See Also:
- setAlignStyle, ALIGN_LEFT, ALIGN_CENTERED, ALIGN_RIGHT
getBevelStyle
public int getBevelStyle()
- Gets the current border style.
- Returns:
- the border bevel style: BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, or BEVEL_NONE
- See Also:
- setBevelStyle, BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, BEVEL_NONE
getBorderIndent
public int getBorderIndent()
- Gets the current border indent amount.
- Returns:
- the amount the border is currently indented: INDENT_ZERO,
INDENT_ONE, or INDENT_TWO
- See Also:
- setBorderIndent, INDENT_ZERO, INDENT_ONE, INDENT_TWO
getBorderedColor
public java.awt.Color getBorderedColor()
- Gets the border color.
- Returns:
- the border color
- See Also:
- setBorderedColor
getMinimumSize
public java.awt.Dimension getMinimumSize()
- Returns the minimum dimensions to properly display this component.
This is a standard Java AWT method which gets called to determine
the minimum size of this component.
The minimum size is that size needed to display the entire label text.
- Overrides:
- getMinimumSize in class Component
- See Also:
- getPreferredSize
getPreferredSize
public java.awt.Dimension getPreferredSize()
- Returns the recommended dimensions to properly display this component.
This is a standard Java AWT method which gets called to determine
the recommended size of this component.
For each axis, the preferred size is the maximum of the current size
and the minimum size needed to display the entire label text.
- Overrides:
- getPreferredSize in class Component
- See Also:
- getMinimumSize
getText
public java.lang.String getText()
- Gets the current label text.
- Returns:
- the current label text
- See Also:
- setText
getTextColor
public java.awt.Color getTextColor()
- Gets the current label text color.
- Returns:
- the current color of the label text
- See Also:
- setTextColor
minimumSize
public java.awt.Dimension minimumSize()
- Note: minimumSize() is deprecated.
-
- Overrides:
- minimumSize in class Component
- See Also:
- getMinimumSize
paint
public void paint(Graphics g)
- Paints this component using the given graphics context.
This is a standard Java AWT method which typically gets called
by the AWT to handle painting this component. It paints this component
using the given graphics context. The graphics context clipping region
is set to the bounding rectangle of this component and its [0,0]
coordinate is this component's top-left corner.
- Parameters:
- g - the graphics context used for painting
- Overrides:
- paint in class Component
- See Also:
- repaint, update
preferredSize
public java.awt.Dimension preferredSize()
- Note: preferredSize() is deprecated.
-
- Overrides:
- preferredSize in class Component
- See Also:
- getPreferredSize
removePropertyChangeListener
public synchronized void removePropertyChangeListener(PropertyChangeListener listener)
- Removes a listener for all event changes.
- Parameters:
- listener - the listener to remove.
- See Also:
- addPropertyChangeListener
removeVetoableChangeListener
public synchronized void removeVetoableChangeListener(VetoableChangeListener listener)
- Removes a vetoable listener for all event changes.
- Parameters:
- listener - the listener to remove.
- See Also:
- addVetoableChangeListener
setAlignStyle
public void setAlignStyle(int newAlignStyle) throws PropertyVetoException
- Sets the text alignment style.
- Parameters:
- style - the text alignment style: ALIGN_LEFT, ALIGN_CENTERED, or ALIGN_RIGHT
- Throws: PropertyVetoException
- if the specified property value is unacceptable
- See Also:
- getAlignStyle, ALIGN_LEFT, ALIGN_CENTERED, ALIGN_RIGHT
setBevelStyle
public void setBevelStyle(int newBevelStyle) throws PropertyVetoException
- Sets the border style.
- Parameters:
- style - the border bevel style: BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, or BEVEL_NONE
- Throws: PropertyVetoException
- if the specified property value is unacceptable
- See Also:
- getBevelStyle, BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, BEVEL_NONE
setBorderIndent
public void setBorderIndent(int newBorderIndent) throws PropertyVetoException
- Sets the border indent amount.
- Parameters:
- newBorderIndent - the amount to indent around the border: INDENT_ZERO,
INDENT_ONE, or INDENT_TWO
- Throws: PropertyVetoException
- if the specified property value is unacceptable
- See Also:
- getBorderIndent, INDENT_ZERO, INDENT_ONE, INDENT_TWO
setBorderedColor
public void setBorderedColor(Color newBorderColor) throws PropertyVetoException
- Sets the border color.
- Parameters:
- newBorderColor - the color to use for the border
- Throws: PropertyVetoException
- if the specified property value is unacceptable
setText
public void setText(String newText) throws PropertyVetoException
- Sets the label text.
- Parameters:
- newText - the new label text
- Throws: PropertyVetoException
- if the specified property value is unacceptable
- See Also:
- getText
setTextColor
public void setTextColor(Color newTextColor) throws PropertyVetoException
- Sets the label text color.
- Parameters:
- newTextColor - the new color for the label text
- Throws: PropertyVetoException
- if the specified property value is unacceptable
- See Also:
- getTextColor
All Packages Class Hierarchy This Package Previous Next Index