|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectetomica.action.ActionToggle
public class ActionToggle
Action that toggles a boolean value. This action can connect to any object capable of switching between two states. The action operates through a ModifierBoolean instance that must be connected to the state of the controlled object.
| Constructor Summary | |
|---|---|
ActionToggle(ModifierBoolean modifier)
|
|
ActionToggle(ModifierBoolean modifier,
String trueText,
String falseText)
|
|
| Method Summary | |
|---|---|
void |
actionPerformed()
Toggles the state of the target object (true to false, false to true). |
static EtomicaInfo |
getEtomicaInfo()
|
String |
getFalseLabel()
|
String |
getLabel()
Returns the true or false label, depending on the current state of the toggle. |
ModifierBoolean |
getModifier()
Returns the boolean modifier used by this action. |
String |
getTrueLabel()
|
void |
setFalseLabel(String text)
Specifies the button's label when the toggle is set to false. |
void |
setModifier(ModifierBoolean newModifier)
Specifies the boolean modifier that is set between true and false by the action. |
void |
setTrueLabel(String text)
Specifies the button's label when the toggle is set to true. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ActionToggle(ModifierBoolean modifier)
public ActionToggle(ModifierBoolean modifier,
String trueText,
String falseText)
| Method Detail |
|---|
public void actionPerformed()
actionPerformed in interface IActionpublic static EtomicaInfo getEtomicaInfo()
public ModifierBoolean getModifier()
public void setModifier(ModifierBoolean newModifier)
public void setTrueLabel(String text)
public String getTrueLabel()
public void setFalseLabel(String text)
public String getFalseLabel()
public String getLabel()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||