public class DeviceToggleRadioButtons extends Device
Device.ActionSet
controller, unit
Constructor | Description |
---|---|
DeviceToggleRadioButtons(ModifierBoolean modifier) |
Constructor with default labels of a blank title and "True" and "False" for
the true/false labels.
|
DeviceToggleRadioButtons(ModifierBoolean modifier,
java.lang.String title,
java.lang.String trueText,
java.lang.String falseText) |
Modifier and Type | Method | Description |
---|---|---|
javax.swing.JRadioButton |
falseButton() |
|
java.lang.String |
getFalseLabel() |
|
ModifierBoolean |
getModifier() |
Specifies the boolean modifier that is set between true and false by the button.
|
boolean |
getState() |
Returns the currents true/false state of the button.
|
java.lang.String |
getTitle() |
|
java.lang.String |
getTrueLabel() |
|
java.awt.Component |
graphic() |
Returns the GUI button element for display in the simulation.
|
void |
setFalseLabel(java.lang.String text) |
Specifies the button's label when the toggle is set to false.
|
void |
setModifier(ModifierBoolean newModifier) |
Returns the boolean modifier set by this button.
|
void |
setState(boolean b) |
Sets the button to the given state.
|
void |
setTitle(java.lang.String text) |
|
void |
setTrueLabel(java.lang.String text) |
Specifies the button's label when the toggle is set to true.
|
javax.swing.JRadioButton |
trueButton() |
doAction, getController, getDimension, getPostAction, getPreAction, getUnit, setController, setPostAction, setPreAction, setUnit
public DeviceToggleRadioButtons(ModifierBoolean modifier)
public DeviceToggleRadioButtons(ModifierBoolean modifier, java.lang.String title, java.lang.String trueText, java.lang.String falseText)
modifier
- the boolean modifier controlled by this devicetitle
- a descriptive string. If empty ("") provides plain border; if null, provides no border.trueText
- text associated with "true" state of modifierfalseText
- text associated with "false" state of modifierpublic void setState(boolean b)
public boolean getState()
public ModifierBoolean getModifier()
public void setModifier(ModifierBoolean newModifier)
public java.awt.Component graphic()
public void setTitle(java.lang.String text)
public java.lang.String getTitle()
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 javax.swing.JRadioButton trueButton()
public javax.swing.JRadioButton falseButton()