Class sunsoft.jws.visual.rt.awt.LabelBar
All Packages Class Hierarchy This Package Previous Next Index
Class sunsoft.jws.visual.rt.awt.LabelBar
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----sunsoft.jws.visual.rt.awt.LabelBar
- public class LabelBar
- extends Canvas
Displays a 3D bar with text within it. Useful as a divider between
different parts of a panel. Uses the java.awt.Label contants for
its alignment settings (LEFT, CENTER, RIGHT.)
When the alignment is set to LEFT, the label looks something like this:
----label---------------------------
Set the edge offset attribute to control how far from the edge the
text in the label rests. When the alignment is CENTER, the offset
is the distance on both sides on the label. You may set
the label text to null to get a label bar that acts merely as a
separator.
-
CENTER
-
The center alignment.
-
LEFT
- The left alignment.
-
RIGHT
- The right alignment.
-
LabelBar()
-
-
LabelBar(String)
-
-
disable()
- Disables this component.
-
enable()
- Enables this component.
-
getAlignment()
-
-
getLabel()
-
-
getLabelOffsetFromEdge()
-
-
minimumSize()
-
-
paint(Graphics)
- Paints LabelBar contents.
-
preferredSize()
-
-
setAlignment(int)
-
-
setForeground(Color)
- Sets the foreground color (the label bar text.) This overrides
the setForeground call in Component in order to get an immediate
repaint when the foreground color setting is changed.
-
setLabel(String)
-
-
setLabelOffsetFromEdge(int)
-
LEFT
public final static int LEFT
- The left alignment.
CENTER
public final static int CENTER
- The center alignment.
RIGHT
public final static int RIGHT
- The right alignment.
LabelBar
public LabelBar()
LabelBar
public LabelBar(String label)
setLabel
public void setLabel(String label)
getLabel
public String getLabel()
setLabelOffsetFromEdge
public void setLabelOffsetFromEdge(int offset)
getLabelOffsetFromEdge
public int getLabelOffsetFromEdge()
setAlignment
public void setAlignment(int alignment)
getAlignment
public int getAlignment()
preferredSize
public Dimension preferredSize()
- Overrides:
- preferredSize in class Component
minimumSize
public Dimension minimumSize()
- Overrides:
- minimumSize in class Component
setForeground
public void setForeground(Color c)
- Sets the foreground color (the label bar text.) This overrides
the setForeground call in Component in order to get an immediate
repaint when the foreground color setting is changed.
- Overrides:
- setForeground in class Component
disable
public void disable()
- Disables this component. This overrides the same call in
Component in order to get an immediate repaint when it is
called.
- Overrides:
- disable in class Component
enable
public void enable()
- Enables this component. This overrides the same call in
Component in order to get an immediate repaint when it is
called.
- Overrides:
- enable in class Component
paint
public void paint(Graphics g)
- Paints LabelBar contents.
- Overrides:
- paint in class Canvas
All Packages Class Hierarchy This Package Previous Next Index