public class VLabel extends VWrapper
VLabel class implements the visual label that
acts as a label model. The label has a enabled state and a focused
state. The label creates different visual presentations according to
the enabled state and the focused state. If the label is disabled,
the grayed label is displayed. If the label is focused, the label is
displayed with a dashed line border.| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected java.awt.Color |
disabledBackground
The background color used when the label is disabled.
|
protected java.awt.Color |
disabledForeground
The foreground color used when the label is disabled.
|
protected VImage |
disabledLabel1
The disabled visual presentation.
|
protected VImage |
disabledLabel2
The disabled visual presentation.
|
protected boolean |
enabled
The enabled state.
|
protected boolean |
focused
The focused state.
|
protected VDashedBorder |
focusedBorder
The dashed line border painted when the label is focused.
|
visualizable| 修飾子 | コンストラクタと説明 |
|---|---|
|
VLabel()
Constructs an empty label.
|
|
VLabel(java.lang.String str)
Constructs a label with the specified string.
|
|
VLabel(Text text)
Constructs a label with the specified text.
|
|
VLabel(Visualizable visualizable)
Constructs a label with the specified visual object.
|
protected |
VLabel(Visualizable visualizable,
boolean enabled,
boolean focused)
Constructs a label with the specified visual object and the
specified states.
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
void |
clearDisabledVisualizable()
Clears the cached visual presentation used when the label is disabled.
|
java.lang.Object |
clone()
Returns a clone of this label.
|
VLabel |
deriveLabel(Visualizable visualizable)
Creates a new label by replicating this label with a new visual
object associated with it.
|
java.awt.Color |
getDisabledBackground()
Returns the background color when the label is disabled.
|
java.awt.Color |
getDisabledForeground()
Returns the foreground color when the label is disabled.
|
protected java.awt.Dimension |
getFocusedSize()
Returns the size of the visual content with the focused (dashed line)
border.
|
java.awt.Dimension |
getSize()
Returns the size of this label.
|
boolean |
isEnabled()
Checks if this label is enabled.
|
boolean |
isFocused()
Checks if this label is focused.
|
protected void |
makeDisabledLabel(java.awt.Component comp)
Makes the visual presentation used when the label is disabled.
|
void |
paint(java.awt.Graphics g,
java.awt.Point p)
Paints the label at the specified location.
|
void |
paint(java.awt.Graphics g,
java.awt.Point p,
java.awt.Component comp)
Paints the label at the specified location with the component.
|
protected void |
paint(java.awt.Graphics g,
java.awt.Point p,
java.awt.Component comp,
boolean raised)
Paints the label at the specified location with the component.
|
protected void |
paintDisabled(java.awt.Graphics g,
java.awt.Point p)
Paints the label at the specified location when the label is disabled.
|
protected void |
paintDisabled(java.awt.Graphics g,
java.awt.Point p,
java.awt.Component comp)
Paints the label at the specified location with the component
when the label is disabled.
|
protected void |
paintEnabled(java.awt.Graphics g,
java.awt.Point p)
Paints the label at the specified location when the label is enabled.
|
protected void |
paintFocused(java.awt.Graphics g,
java.awt.Point p)
Paints the focused (dashed line) border at the specified location
when the label is focused.
|
void |
setDisabledBackground(java.awt.Color c)
Sets the background color when the label is disabled
to be the specified color.
|
void |
setDisabledForeground(java.awt.Color c)
Sets the foreground color when the label is disabled
to be the specified color.
|
void |
setEnabled(boolean b)
Sets the enabled state to be the specified boolean.
|
void |
setFocused(boolean b)
Sets the focused state to be the specified boolean.
|
void |
setFocusedSize(java.awt.Dimension d)
Resizes the visual content with the focused (dashed line) border
to the specified dimension.
|
void |
setSize(java.awt.Dimension d)
Resizes the label to the specified dimension.
|
void |
setVisualizable(Visualizable visualizable)
Sets the visual content of this label to be the specified
visual object.
|
getVisualizable, isResizableprotected boolean enabled
protected java.awt.Color disabledForeground
protected java.awt.Color disabledBackground
protected transient VImage disabledLabel1
protected transient VImage disabledLabel2
protected boolean focused
protected VDashedBorder focusedBorder
public VLabel()
public VLabel(java.lang.String str)
str - the string.public VLabel(Text text)
text - the text.public VLabel(Visualizable visualizable)
visualizable - the visual object.protected VLabel(Visualizable visualizable, boolean enabled, boolean focused)
visualizable - the visual object.enabled - the enabled state.focused - the focused state.public VLabel deriveLabel(Visualizable visualizable)
visualizable - the visual object for the new label.public void setVisualizable(Visualizable visualizable)
setVisualizable クラス内 VWrappervisualizable - the visual object.public boolean isFocused()
true if this label is focused;
false otherwise.public void setFocused(boolean b)
b - the boolean.public boolean isEnabled()
true if this label is enabled;
false otherwise.public void setEnabled(boolean b)
b - the boolean.public java.awt.Color getDisabledForeground()
public void setDisabledForeground(java.awt.Color c)
c - the color.public java.awt.Color getDisabledBackground()
public void setDisabledBackground(java.awt.Color c)
c - the color.public void clearDisabledVisualizable()
public java.awt.Dimension getSize()
getSize インタフェース内 VisualizablegetSize クラス内 VWrapperVisualizable.getSize()protected java.awt.Dimension getFocusedSize()
public void setSize(java.awt.Dimension d)
setSize インタフェース内 VisualizablesetSize クラス内 VWrapperd - the visual object dimension.Visualizable.setSize(java.awt.Dimension)public void setFocusedSize(java.awt.Dimension d)
public void paint(java.awt.Graphics g,
java.awt.Point p)
paint インタフェース内 Visualizablepaint クラス内 VWrapperg - the specified graphics.p - the location in the graphics to be painted.Visualizable.paint(java.awt.Graphics, java.awt.Point)public void paint(java.awt.Graphics g,
java.awt.Point p,
java.awt.Component comp)
g - the graphics.p - the location.comp - the component used to make the disabled presentation.public java.lang.Object clone()
clone インタフェース内 Visualizableclone クラス内 VWrapperprotected void paint(java.awt.Graphics g,
java.awt.Point p,
java.awt.Component comp,
boolean raised)
g - the graphics.p - the location.comp - the component used to make the disabled presentation.raised - if false, paints the visual content at the sunk location.protected void paintEnabled(java.awt.Graphics g,
java.awt.Point p)
protected void paintDisabled(java.awt.Graphics g,
java.awt.Point p)
protected void paintDisabled(java.awt.Graphics g,
java.awt.Point p,
java.awt.Component comp)
protected void paintFocused(java.awt.Graphics g,
java.awt.Point p)
protected void makeDisabledLabel(java.awt.Component comp)