|
||||||||||
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.EnumControl
public abstract class EnumControl
A EnumControl
provides control over a set of discrete possible values, each represented by an object. In a
graphical user interface, such a control might be represented
by a set of buttons, each of which chooses one value or setting.
Constructor Summary | |
---|---|
EnumControl(int id,
java.lang.String name,
java.lang.Object value)
Constructs a new enumerated control object with the given parameters. |
Method Summary | |
---|---|
int |
getIntValue()
|
java.lang.Object |
getValue()
Obtains this control's current value. |
abstract java.util.List |
getValues()
|
java.lang.String |
getValueString()
override for real value strings where possible |
boolean |
hasLabel()
|
boolean |
isWidthLimited()
|
void |
setIntValue(int value)
|
void |
setValue(java.lang.Object 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 EnumControl(int id, java.lang.String name, java.lang.Object value)
value
- the initial control valueMethod Detail |
---|
public void setValue(java.lang.Object value)
value
- the desired new value
java.lang.IllegalArgumentException
- if the value indicated does not fall within the allowable rangepublic java.lang.Object getValue()
public abstract java.util.List getValues()
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()
public boolean hasLabel()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |