|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--y.option.OptionItem
|
+--y.option.IntOptionItem
An option item for integer values.
Provides an editor based on a JTextField and an optional JSlider for bounded integer values.
| Field Summary | |
protected int |
backupValue
|
protected JComponent |
editor
|
protected boolean |
hasBounds
|
protected int |
max
|
protected int |
min
|
protected int |
value
|
| Fields inherited from class y.option.OptionItem |
COLOR_UNDEFINED, name, UNDEFINED |
| Constructor Summary | |
IntOptionItem(String name,
int value)
Creates a new instance of IntOptionItem. |
|
IntOptionItem(String name,
int value,
int minValue,
int maxValue)
Creates a new instance of IntOptionItem for bounded values. |
|
| Method Summary | |
boolean |
adoptEditorValue()
Adopts the value from the editor component to the item. |
boolean |
checkEditorValue()
Whether or not the value entered in the editor is valid for this option item. |
JComponent |
getEditor()
Returns the editor component for the this option item. |
String |
getType()
Returns "Int" |
Object |
getValue()
Returns the value of this option item |
void |
resetValue()
Resets the value of this item to its initial value. |
void |
setValue(Object v)
Sets the value of this option item |
| Methods inherited from class y.option.OptionItem |
getClassType, getEditor, getName, getStringValue, getTipText, isValueUndefined, setClassType, setStringValue, setTipText, setValueUndefined, wantsVisibleName |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected int value
protected int backupValue
protected int min
protected int max
protected boolean hasBounds
protected JComponent editor
| Constructor Detail |
public IntOptionItem(String name,
int value)
name - the name of this itemvalue - the initial integer value
public IntOptionItem(String name,
int value,
int minValue,
int maxValue)
name - the name of this itemvalue - the initial integer valueminValue - the minimal value the integer value can have.maxValue - the maximal value the integer value can have.| Method Detail |
public String getType()
getType in class OptionItempublic Object getValue()
OptionItem
getValue in class OptionItempublic void setValue(Object v)
OptionItem
setValue in class OptionItempublic boolean adoptEditorValue()
OptionItem
adoptEditorValue in class OptionItempublic void resetValue()
OptionItem
resetValue in class OptionItempublic boolean checkEditorValue()
OptionItem
checkEditorValue in class OptionItempublic JComponent getEditor()
OptionItem
getEditor in class OptionItem
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||