All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jp.kyasu.graphics.VButton

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

public class VButton
extends VAbstractButton
The VButton class implements the visual button that acts as a button model. The button creates different visual presentations according to the style and the state.

Version:
12 Jun 1998
Author:
Kazuki YASUMATSU
See Also:
AbstractButton, Button, ToggleButton

Variable Index

 o TOGGLE
The button style constat for the toggle style.
 o TRIGGER
The button style constat for the trigger style.

Constructor Index

 o VButton()
Constructs a trigger button with the false state.
 o VButton(boolean)
Constructs a trigger button with the specified state.
 o VButton(boolean, int)
Constructs a button with the specified state and the specified style.
 o VButton(int)
Constructs a button with the false state, and the specified style.
 o VButton(String)
Constructs a trigger button with the false state, and the specified string.
 o VButton(String, boolean)
Constructs a trigger button with the specified string and the specified state.
 o VButton(String, boolean, int)
Constructs a button with the specified string, the specified state, and the specified style.
 o VButton(String, int)
Constructs a button with the false state, the specified string, and the specified style.
 o VButton(Text)
Constructs a trigger button with the false state, and the specified text.
 o VButton(Text, boolean)
Constructs a trigger button with the specified text and the specified state.
 o VButton(Text, boolean, int)
Constructs a button with the specified text, the specified state, and the specified style.
 o VButton(Text, int)
Constructs a button with the false state, the specified text, and the specified style.
 o VButton(Visualizable)
Constructs a trigger button with the false state, and the specified visual object.
 o VButton(Visualizable, boolean)
Constructs a trigger button with the specified visual object and the specified state.
 o VButton(Visualizable, boolean, int)
Constructs a button with the specified visual object, the specified state, and the specified style.
 o VButton(Visualizable, int)
Constructs a button with the false state, the specified visual object, and the specified style.

Method Index

 o clone()
Returns a clone of this button.
 o deriveLabel(Visualizable)
Creates a new button by replicating this button with a new visual object associated with it.
 o getInsets()
Returns the insets of this button.
 o getSize()
Returns the size of this button.
 o getStyle()
Returns the style of the button.
 o paint(Graphics, Point, Component)
Paints the button at the specified location with the component.
 o setInsets(Insets)
Sets the insets of this button to be the specified insets.
 o setSize(Dimension)
Resizes the button to the specified dimension.
 o setState(boolean)
Sets the button to the specifed boolean state.
 o setStyle(int)
Sets the style of the button to the specified style.

Variables

 o TRIGGER
 public static final int TRIGGER
The button style constat for the trigger style.

 o TOGGLE
 public static final int TOGGLE
The button style constat for the toggle style.

Constructors

 o VButton
 public VButton()
Constructs a trigger button with the false state.

 o VButton
 public VButton(boolean state)
Constructs a trigger button with the specified state.

Parameters:
state - the state of the button.
 o VButton
 public VButton(int style)
Constructs a button with the false state, and the specified style.

Parameters:
style - the style of teh button.
 o VButton
 public VButton(boolean state,
                int style)
Constructs a button with the specified state and the specified style.

Parameters:
state - the state of teh button.
style - the style of teh button.
 o VButton
 public VButton(String str)
Constructs a trigger button with the false state, and the specified string.

Parameters:
str - the string.
 o VButton
 public VButton(String str,
                boolean state)
Constructs a trigger button with the specified string and the specified state.

Parameters:
str - the string.
state - the state of the button.
 o VButton
 public VButton(String str,
                int style)
Constructs a button with the false state, the specified string, and the specified style.

Parameters:
str - the string.
style - the style of the button.
 o VButton
 public VButton(String str,
                boolean state,
                int style)
Constructs a button with the specified string, the specified state, and the specified style.

Parameters:
str - the string.
state - the state of teh button.
style - the style of teh button.
 o VButton
 public VButton(Text text)
Constructs a trigger button with the false state, and the specified text.

Parameters:
text - the text.
 o VButton
 public VButton(Text text,
                boolean state)
Constructs a trigger button with the specified text and the specified state.

Parameters:
text - the text.
state - the state of the button.
 o VButton
 public VButton(Text text,
                int style)
Constructs a button with the false state, the specified text, and the specified style.

Parameters:
text - the text.
style - the style of the button.
 o VButton
 public VButton(Text text,
                boolean state,
                int style)
Constructs a button with the specified text, the specified state, and the specified style.

Parameters:
text - the text.
state - the state of teh button.
style - the style of teh button.
 o VButton
 public VButton(Visualizable visualizable)
Constructs a trigger button with the false state, and the specified visual object.

Parameters:
visualizable - the visual object.
 o VButton
 public VButton(Visualizable visualizable,
                boolean state)
Constructs a trigger button with the specified visual object and the specified state.

Parameters:
visualizable - the visual object.
state - the state of the button.
 o VButton
 public VButton(Visualizable visualizable,
                int style)
Constructs a button with the false state, the specified visual object, and the specified style.

Parameters:
visualizable - the visual object.
style - the style of the button.
 o VButton
 public VButton(Visualizable visualizable,
                boolean state,
                int style)
Constructs a button with the specified visual object, the specified state, and the specified style.

Parameters:
visualizable - the visual object.
state - the state of teh button.
style - the style of teh button.

Methods

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

Parameters:
visualizable - the visual object for the new button.
Returns:
a new button.
Overrides:
deriveLabel in class VLabel
 o getStyle
 public int getStyle()
Returns the style of the button.

Returns:
the style of the button.
See Also:
TRIGGER, TOGGLE
 o setStyle
 public void setStyle(int style)
Sets the style of the button to the specified style.

Parameters:
style - the style of the button.
See Also:
TRIGGER, TOGGLE
 o setState
 public void setState(boolean b)
Sets the button to the specifed boolean state.

Overrides:
setState in class VAbstractButton
See Also:
setState
 o getInsets
 public Insets getInsets()
Returns the insets of this button.

Returns:
the insets of this button.
 o setInsets
 public void setInsets(Insets insets)
Sets the insets of this button to be the specified insets.

Parameters:
insets - the insets.
 o getSize
 public Dimension getSize()
Returns the size of this button.

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

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

Parameters:
g - the graphics.
p - the location.
comp - the component used to make the disabled presentation.
Overrides:
paint in class VLabel
 o clone
 public Object clone()
Returns a clone of this button.

Overrides:
clone in class VAbstractButton

All Packages  Class Hierarchy  This Package  Previous  Next  Index