|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.option.OptionItem | +--y.option.DoubleOptionItem
An option item for double values.
Provides an editor based on a JTextField and an optional JSlider for bounded double values.
Field Summary |
Fields inherited from class y.option.OptionItem |
COLOR_UNDEFINED, name, UNDEFINED |
Constructor Summary | |
DoubleOptionItem(String name,
double value)
Creates a new instance of DoubleOptionItem. |
|
DoubleOptionItem(String name,
double value,
double minValue,
double maxValue)
Creates a new instance of DoubleOptionItem for bounded values. |
|
DoubleOptionItem(String name,
double value,
double minValue,
double maxValue,
int precision)
Like DoubleOptionItem.DoubleOptionItem(String,double,double,double) . |
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 "Double" |
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 |
Constructor Detail |
public DoubleOptionItem(String name, double value)
name
- the name of this itemvalue
- the initial double valuepublic DoubleOptionItem(String name, double value, double minValue, double maxValue)
name
- the name of this itemvalue
- the initial double valueminValue
- the minimal value the double value can have.maxValue
- the maximal value the double value can have.public DoubleOptionItem(String name, double value, double minValue, double maxValue, int precision)
DoubleOptionItem.DoubleOptionItem(String,double,double,double)
. Additionally
one can specify the slider precision for the double value. the precision
is mesured by the the number of decimal places of the value.
By default the number of decimal places is 1.
name
- the name of this itemvalue
- the initial double valueminValue
- the minimal value the double value can have.maxValue
- the maximal value the double value can have.precision
- the slider precision for the value.Method Detail |
public Object getValue()
OptionItem
getValue
in class OptionItem
public void setValue(Object v)
OptionItem
setValue
in class OptionItem
public String getType()
getType
in class OptionItem
public boolean adoptEditorValue()
OptionItem
adoptEditorValue
in class OptionItem
public void resetValue()
OptionItem
resetValue
in class OptionItem
public boolean checkEditorValue()
OptionItem
checkEditorValue
in class OptionItem
public 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 |