public class Switch
extends java.lang.Object
Constructor and Description |
---|
Switch()
construct a new switch in off state
|
Modifier and Type | Method and Description |
---|---|
void |
addSwitchListener(SwitchListener l)
add a new listener to this switch
|
int |
getValue()
retrieve the user value of this switch
|
boolean |
isOff()
determine if the switch is in off position
|
boolean |
isOn()
determine if the switch is in on position
|
void |
off()
set the switch to the off position
|
void |
on()
set the switch to on position
|
void |
setValue(int newValue)
set new user value of this switch
|
public void addSwitchListener(SwitchListener l)
public void on()
public void off()
public boolean isOn()
public boolean isOff()
public void setValue(int newValue)
public int getValue()