|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Observable
uk.org.toot.control.Control
uk.org.toot.control.BooleanControl
public class BooleanControl
A BooleanControl enables control of a boolean value.
Constructor Summary | |
---|---|
BooleanControl(int id,
java.lang.String name,
boolean initialValue)
Constructs a new boolean control object with the given parameters. |
|
BooleanControl(int id,
java.lang.String name,
boolean initialValue,
boolean momentary)
|
|
BooleanControl(int id,
java.lang.String name,
boolean initialValue,
java.lang.String trueStateLabel,
java.lang.String falseStateLabel)
Constructs a new boolean control object with the given parameters. |
Method Summary | |
---|---|
int |
getIntValue()
|
java.awt.Color |
getStateColor(boolean state)
|
java.lang.String |
getStateLabel(boolean state)
Obtains the label for the specified state. |
boolean |
getValue()
Obtains this control's current value. |
java.lang.String |
getValueString()
override for real value strings where possible |
boolean |
isMomentary()
|
boolean |
isWidthLimited()
|
void |
momentaryAction()
|
void |
setIntValue(int value)
|
void |
setStateColor(boolean state,
java.awt.Color color)
|
void |
setValue(boolean value)
Sets the current value for the control. |
java.lang.String |
toString()
Provides a string representation of the control |
Methods inherited from class uk.org.toot.control.Control |
---|
getAnnotation, getControlPath, getControlPath, getId, getName, getParent, isAdjusting, isEnabled, isHidden, isIndicator, setAdjusting, setAnnotation, setEnabled, setHidden, setName |
Methods inherited from class java.util.Observable |
---|
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BooleanControl(int id, java.lang.String name, boolean initialValue, java.lang.String trueStateLabel, java.lang.String falseStateLabel)
initialValue
- the initial control valuetrueStateLabel
- the label for the state represented by true
, such as "true" or "on."falseStateLabel
- the label for the state represented by false
, such as "false" or "off."public BooleanControl(int id, java.lang.String name, boolean initialValue)
true
and false
states default to "true" and "false."
id
- the id of the control represented by this float control objectinitialValue
- the initial control valuepublic BooleanControl(int id, java.lang.String name, boolean initialValue, boolean momentary)
Method Detail |
---|
public boolean isMomentary()
public void setValue(boolean value)
value
- desired new value.public void momentaryAction()
public boolean getValue()
public void setStateColor(boolean state, java.awt.Color color)
public java.awt.Color getStateColor(boolean state)
public java.lang.String getStateLabel(boolean state)
true
, or "false" or "off" for false
.public java.lang.String toString()
toString
in class Control
public java.lang.String getValueString()
Control
getValueString
in class Control
public void setIntValue(int value)
setIntValue
in class Control
public int getIntValue()
getIntValue
in class Control
public boolean isWidthLimited()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |