All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jp.kyasu.graphics.VLabel

java.lang.Object
   |
   +----jp.kyasu.graphics.VWrapper
           |
           +----jp.kyasu.graphics.VLabel

public class VLabel
extends VWrapper
The 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.

Version:
12 Jun 1998
Author:
Kazuki YASUMATSU
See Also:
Label

Constructor Index

 o VLabel()
Constructs an empty label.
 o VLabel(String)
Constructs a label with the specified string.
 o VLabel(Text)
Constructs a label with the specified text.
 o VLabel(Visualizable)
Constructs a label with the specified visual object.

Method Index

 o clearDisabledVisualizable()
Clears the cached visual presentation used when the label is disabled.
 o clone()
Returns a clone of this label.
 o deriveLabel(Visualizable)
Creates a new label by replicating this label with a new visual object associated with it.
 o getDisabledBackground()
Returns the background color when the label is disabled.
 o getDisabledForeground()
Returns the foreground color when the label is disabled.
 o getSize()
Returns the size of this label.
 o isEnabled()
Checks if this label is enabled.
 o isFocused()
Checks if this label is focused.
 o paint(Graphics, Point)
Paints the label at the specified location.
 o paint(Graphics, Point, Component)
Paints the label at the specified location with the component.
 o setDisabledBackground(Color)
Sets the background color when the label is disabled to be the specified color.
 o setDisabledForeground(Color)
Sets the foreground color when the label is disabled to be the specified color.
 o setEnabled(boolean)
Sets the enabled state to be the specified boolean.
 o setFocused(boolean)
Sets the focused state to be the specified boolean.
 o setFocusedSize(Dimension)
Resizes the visual content with the focused (dashed line) border to the specified dimension.
 o setSize(Dimension)
Resizes the label to the specified dimension.
 o setVisualizable(Visualizable)
Sets the visual content of this label to be the specified visual object.

Constructors

 o VLabel
 public VLabel()
Constructs an empty label.

 o VLabel
 public VLabel(String str)
Constructs a label with the specified string.

Parameters:
str - the string.
 o VLabel
 public VLabel(Text text)
Constructs a label with the specified text.

Parameters:
text - the text.
 o VLabel
 public VLabel(Visualizable visualizable)
Constructs a label with the specified visual object.

Parameters:
visualizable - the visual object.

Methods

 o deriveLabel
 public VLabel deriveLabel(Visualizable visualizable)
Creates a new label by replicating this label with a new visual object associated with it.

Parameters:
visualizable - the visual object for the new label.
Returns:
a new label.
 o setVisualizable
 public void setVisualizable(Visualizable visualizable)
Sets the visual content of this label to be the specified visual object.

Parameters:
visualizable - the visual object.
Overrides:
setVisualizable in class VWrapper
 o isFocused
 public boolean isFocused()
Checks if this label is focused.

Returns:
true if this label is focused; false otherwise.
 o setFocused
 public void setFocused(boolean b)
Sets the focused state to be the specified boolean.

Parameters:
b - the boolean.
 o isEnabled
 public boolean isEnabled()
Checks if this label is enabled.

Returns:
true if this label is enabled; false otherwise.
 o setEnabled
 public void setEnabled(boolean b)
Sets the enabled state to be the specified boolean.

Parameters:
b - the boolean.
 o getDisabledForeground
 public Color getDisabledForeground()
Returns the foreground color when the label is disabled.

Returns:
the foreground color when the label is disabled.
 o setDisabledForeground
 public void setDisabledForeground(Color c)
Sets the foreground color when the label is disabled to be the specified color.

Parameters:
c - the color.
 o getDisabledBackground
 public Color getDisabledBackground()
Returns the background color when the label is disabled.

Returns:
the background color when the label is disabled.
 o setDisabledBackground
 public void setDisabledBackground(Color c)
Sets the background color when the label is disabled to be the specified color.

Parameters:
c - the color.
 o clearDisabledVisualizable
 public synchronized void clearDisabledVisualizable()
Clears the cached visual presentation used when the label is disabled.

 o getSize
 public Dimension getSize()
Returns the size of this label.

Overrides:
getSize in class VWrapper
See Also:
getSize
 o setSize
 public void setSize(Dimension d)
Resizes the label to the specified dimension.

Overrides:
setSize in class VWrapper
See Also:
setSize
 o setFocusedSize
 public void setFocusedSize(Dimension d)
Resizes the visual content with the focused (dashed line) border to the specified dimension.

 o paint
 public void paint(Graphics g,
                   Point p)
Paints the label at the specified location.

Overrides:
paint in class VWrapper
See Also:
paint
 o paint
 public void paint(Graphics g,
                   Point p,
                   Component comp)
Paints the label at the specified location with the component.

Parameters:
g - the graphics.
p - the location.
comp - the component used to make the disabled presentation.
 o clone
 public Object clone()
Returns a clone of this label.

Overrides:
clone in class VWrapper

All Packages  Class Hierarchy  This Package  Previous  Next  Index