All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class symantec.itools.awt.Label3D

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----symantec.itools.awt.Label3D

public class Label3D
extends Canvas
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.


Variable Index

 o INDENT_ONE
Constant indicating a drawing margin of 1 pixel around the outside of the border.
 o INDENT_TWO
Constant indicating a drawing margin of 2 pixels around the outside of the border.
 o INDENT_ZERO
Constant indicating a drawing margin of 0 pixels around the outside of the border.
 o sLabel3D
The label text.

Constructor Index

 o Label3D()
Constructs an empty Label3D with black text that is center aligned and a raised border with zero border indent.
 o Label3D(String, int, int)
Constructs a Label3D with black text, zero border indent, and the specified text alignment and bevel styles.
 o Label3D(String, int, int, Color)
Constructs a Label3D with a zero border indent and the specified attributes.
 o Label3D(String, int, int, Color, int)
Constructs a Label3D with the specified attributes.
 o Label3D(String, int, int, int)
Constructs a Label3D with black text and the specified attributes.

Method Index

 o getAlignStyle()
Gets the current alignment style.
 o getBevelStyle()
Gets the current border style.
 o getBorderedColor()
Gets the border color.
 o getBorderIndent()
Gets the current border indent amount.
 o getText()
Gets the current label text.
 o getTextColor()
Gets the current label text color.
 o minimumSize()
Returns the minimum dimensions to properly display this component.
 o paint(Graphics)
Paints this component using the given graphics context.
 o preferredSize()
Returns the recommended dimensions to properly display this component.
 o reshape(int, int, int, int)
Moves and/or resizes this component.
 o setAlignStyle(int)
Sets the text alignment style.
 o setBevelStyle(int)
Sets the border style.
 o setBorderedColor(Color)
Sets the border color.
 o setBorderIndent(int)
Sets the border indent amount.
 o setText(String)
Sets the label text.
 o setTextColor(Color)
Sets the label text color.

Variables

 o INDENT_ZERO
  public final static int INDENT_ZERO
Constant indicating a drawing margin of 0 pixels around the outside of the border.

 o INDENT_ONE
  public final static int INDENT_ONE
Constant indicating a drawing margin of 1 pixel around the outside of the border.

 o INDENT_TWO
  public final static int INDENT_TWO
Constant indicating a drawing margin of 2 pixels around the outside of the border.

 o sLabel3D
  protected String sLabel3D
The label text.

Constructors

 o Label3D
  public Label3D()
Constructs an empty Label3D with black text that is center aligned and a raised border with zero border indent.

 o 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
 o 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
 o 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
 o 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

Methods

 o setAlignStyle
  public void setAlignStyle(int style)
Sets the text alignment style.

Parameters:
style - the text alignment style: ALIGN_LEFT, ALIGN_CENTERED, or ALIGN_RIGHT
See Also:
getAlignStyle, ALIGN_LEFT, ALIGN_CENTERED, ALIGN_RIGHT
 o 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
 o setBevelStyle
  public void setBevelStyle(int style)
Sets the border style.

Parameters:
style - the border bevel style: BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, or BEVEL_NONE
See Also:
getBevelStyle, BEVEL_RAISED, BEVEL_LOWERED, BEVEL_LINE, BEVEL_NONE
 o 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
 o setBorderIndent
  public void setBorderIndent(int indent)
Sets the border indent amount.

Parameters:
indent - the amount to indent the border: INDENT_ZERO, INDENT_ONE, or INDENT_TWO
See Also:
getBorderIndent, INDENT_ZERO, INDENT_ONE, INDENT_TWO
 o 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
 o setBorderedColor
  public void setBorderedColor(Color color)
Sets the border color.

Parameters:
color - the color to use for the border
 o getBorderedColor
  public Color getBorderedColor()
Gets the border color.

Returns:
the border color
See Also:
getBorderedColor
 o setText
  public void setText(String sText)
Sets the label text.

Parameters:
sLabel - the new label text
See Also:
getText
 o getText
  public String getText()
Gets the current label text.

Returns:
the current label text
See Also:
setText
 o setTextColor
  public void setTextColor(Color color)
Sets the label text color.

Parameters:
color - the new color for the label text
See Also:
getTextColor
 o getTextColor
  public Color getTextColor()
Gets the current label text color.

Returns:
the current color of the label text
See Also:
setTextColor
 o 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 Canvas
See Also:
repaint, update
 o preferredSize
  public Dimension preferredSize()
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:
preferredSize in class Component
See Also:
minimumSize
 o minimumSize
  public Dimension minimumSize()
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:
minimumSize in class Component
See Also:
preferredSize
 o reshape
  public synchronized void reshape(int x,
                                   int y,
                                   int width,
                                   int height)
Moves and/or resizes this component. This is a standard Java AWT method which gets called to move and/or resize this component. Components that are in containers with layout managers should not call this method, but rely on the layout manager instead.

Parameters:
x - horizontal position in the parent's coordinate space
y - vertical position in the parent's coordinate space
width - the new width
height - the new height
Overrides:
reshape in class Component

All Packages  Class Hierarchy  This Package  Previous  Next  Index