|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectetomica.graphics.Device
etomica.graphics.DeviceCheckBox
public class DeviceCheckBox
Button that toggles a boolean value via a check box. This device can connect to any object capable of switching between two states. The device operates through a ModifierBoolean instance that must be connected to the state of the controlled object.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class etomica.graphics.Device |
|---|
Device.ActionSet |
| Field Summary |
|---|
| Fields inherited from class etomica.graphics.Device |
|---|
controller, unit |
| Constructor Summary | |
|---|---|
DeviceCheckBox(ModifierBoolean modifier)
|
|
DeviceCheckBox(String label,
ModifierBoolean modifier)
|
|
| Method Summary | |
|---|---|
JCheckBox |
getCheckBox()
|
static EtomicaInfo |
getEtomicaInfo()
|
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. |
Component |
graphic(Object obj)
Returns the GUI box element for display in the simulation. |
void |
setModifier(ModifierBoolean newModifier)
Returns the boolean modifier set by this button. |
void |
setState(boolean b)
Sets the button to the given state. |
void |
toggle()
Toggles the state of the button (true to false, false to true). |
| Methods inherited from class etomica.graphics.Device |
|---|
doAction, getController, getDimension, getPostAction, getPreAction, getUnit, graphic, setController, setPostAction, setPreAction, setUnit |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DeviceCheckBox(ModifierBoolean modifier)
public DeviceCheckBox(String label,
ModifierBoolean modifier)
| Method Detail |
|---|
public static EtomicaInfo getEtomicaInfo()
public void setState(boolean b)
public boolean getState()
public void toggle()
public ModifierBoolean getModifier()
public void setModifier(ModifierBoolean newModifier)
public Component graphic(Object obj)
graphic in interface GraphicalElementgraphic in class Deviceobj - An object that might be used to specify the graphic that the GraphicalElement is to return.
In most cases the GraphicalElement ignores this parameter, and it can be set to null.
Device,
Displaypublic JCheckBox getCheckBox()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||