Class awt.Toggle
All Packages    This Package    Previous    Next

Class awt.Toggle

java.lang.Object
   |
   +----awt.Component
           |
           +----awt.Toggle

public class Toggle
extends Component
A Toggle object is a gui element that has a boolean state.
Version:
1.12 03 Feb 1995
Author:
Sami Shaio

group
label

Toggle(String, String, Container, RadioGroup, boolean)
Constructs a Toggle.
Toggle(String, String, Container, boolean)
Constructs a Toggle (defaults RadioGroup to null)

dispose()
Disposes of this Toggle.
getState()
Returns the state of the Toggle.
map()
Shows this Toggle.
move(int, int)
Moves this toggle.
reshape(int, int, int, int)
Reshapes this Toggle.
selected()
Override this method to take some action when the state changes.
setState(boolean)
Sets the state of the Toggle.
unMap()
Hides this Toggle.

label
  public String label
group
  public RadioGroup group

Toggle
  public Toggle(String pLabel,
                String pName,
                Container pParent,
                RadioGroup group,
                boolean state)
Constructs a Toggle.
Parameters:
pLabel - is the label of this toggle button.
pName - is the name of this Toggle.
pParent - is the window to contain this Toggle.
group - is the RadioGroup this Toggle is in. If not null, then this Toggle becomes a radio button which means only one Toggle in a RadioGroup may be set.
state - is the initial state of this Toggle.

Toggle

  public Toggle(String pLabel,
                String pName,
                Container pParent,
                boolean state)
Constructs a Toggle (defaults RadioGroup to null)

setState
  public void setState(boolean state)
Sets the state of the Toggle.

getState

  public boolean getState()
Returns the state of the Toggle.

move

  public void move(int x,
                   int y)
Moves this toggle.
Overrides:
move in class Component

reshape

  public void reshape(int x,
                      int y,
                      int w,
                      int h)
Reshapes this Toggle.
Overrides:
reshape in class Component

dispose

  public void dispose()
Disposes of this Toggle.
Overrides:
dispose in class Component

map

  public void map()
Shows this Toggle.
Overrides:
map in class Component

unMap

  public void unMap()
Hides this Toggle.
Overrides:
unMap in class Component

selected

  public void selected()
Override this method to take some action when the state changes.


All Packages    This Package    Previous    Next