public class DeviceToggleButton extends DeviceButton
Device.ActionSet
Modifier and Type | Field | Description |
---|---|---|
protected ActionToggle |
toggleAction |
controller, unit
button, targetAction
Constructor | Description |
---|---|
DeviceToggleButton(Controller controller) |
|
DeviceToggleButton(Controller controller,
ModifierBoolean modifier) |
|
DeviceToggleButton(Controller controller,
ModifierBoolean modifier,
java.lang.String trueText,
java.lang.String falseText) |
Modifier and Type | Method | Description |
---|---|---|
java.lang.String |
getFalseLabel() |
|
boolean |
getState() |
Returns the current true/false state of the button.
|
java.lang.String |
getTrueLabel() |
|
static void |
main(java.lang.String[] args) |
Method to demonstrate and test the use of this class.
|
void |
setFalseLabel(java.lang.String text) |
Specifies the button's label when the toggle is set to false.
|
void |
setModifier(ModifierBoolean modifier,
java.lang.String trueText,
java.lang.String falseText) |
|
void |
setState(boolean b) |
Toggles the button to the given state.
|
void |
setTrueLabel(java.lang.String text) |
Specifies the button's label when the toggle is set to true.
|
doAction, getController, getDimension, getPostAction, getPreAction, getUnit, setController, setPostAction, setPreAction, setUnit
protected ActionToggle toggleAction
public DeviceToggleButton(Controller controller)
public DeviceToggleButton(Controller controller, ModifierBoolean modifier)
public DeviceToggleButton(Controller controller, ModifierBoolean modifier, java.lang.String trueText, java.lang.String falseText)
public void setModifier(ModifierBoolean modifier, java.lang.String trueText, java.lang.String falseText)
public void setState(boolean b)
public boolean getState()
public void setTrueLabel(java.lang.String text)
public java.lang.String getTrueLabel()
public void setFalseLabel(java.lang.String text)
public java.lang.String getFalseLabel()
public static void main(java.lang.String[] args)