|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.option.OptionItem y.option.ObjectOptionItem y.option.DoubleOptionItem
public class DoubleOptionItem
An option item for double values.
Field Summary | |
---|---|
static java.lang.String |
ATTRIBUTE_LOCALE
Attribute key used to store an editor hint which specifies that values should be parsed according specified locale. |
static java.lang.String |
ATTRIBUTE_MAX_VALUE
Attribute key to specify an upper bound for accepted values. |
static java.lang.String |
ATTRIBUTE_MIN_VALUE
Attribute key to specify a lower bound for accepted values. |
static java.lang.String |
ATTRIBUTE_PRECISION
Attribute key used to store the display precision. |
static java.lang.String |
ATTRIBUTE_UNSIGNED
Attribute key used to store an editor hint which specifies that values should be displayed without any sign prefix. |
Fields inherited from class y.option.OptionItem |
---|
ATTRIBUTE_CONTEXT, ATTRIBUTE_GROUPS, ATTRIBUTE_LONG_DESCRIPTION, COLOR_UNDEFINED, name, PROPERTY_CLASS_TYPE, PROPERTY_ENABLED, PROPERTY_TIP_TEXT, PROPERTY_VALUE, PROPERTY_VALUE_UNDEFINED, UNDEFINED |
Constructor Summary | |
---|---|
DoubleOptionItem(java.lang.String name,
double value)
Creates a new instance of DoubleOptionItem. |
|
DoubleOptionItem(java.lang.String name,
java.lang.Double value)
Creates a new instance of DoubleOptionItem. |
|
DoubleOptionItem(java.lang.String name,
double value,
double minValue,
double maxValue)
Creates a new instance of DoubleOptionItem for bounded values. |
|
DoubleOptionItem(java.lang.String name,
double value,
double minValue,
double maxValue,
int precision)
Like DoubleOptionItem(String,double,double,double) . |
Method Summary | |
---|---|
java.lang.String |
getType()
Returns "Double". |
void |
setValue(java.lang.Object value)
Sets the value of this option item. |
Methods inherited from class y.option.ObjectOptionItem |
---|
getBackupValue, getValue, resetValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ATTRIBUTE_MIN_VALUE
Double
.
public static final java.lang.String ATTRIBUTE_MAX_VALUE
Double
.
public static final java.lang.String ATTRIBUTE_PRECISION
Integer
.
public static final java.lang.String ATTRIBUTE_UNSIGNED
Boolean
.
public static final java.lang.String ATTRIBUTE_LOCALE
Locale
.
Constructor Detail |
---|
public DoubleOptionItem(java.lang.String name, java.lang.Double value)
name
- the name of this itemvalue
- the initial double valuepublic DoubleOptionItem(java.lang.String name, double value)
name
- the name of this itemvalue
- the initial double valuepublic DoubleOptionItem(java.lang.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(java.lang.String name, double value, double minValue, double maxValue, int precision)
DoubleOptionItem(String,double,double,double)
. Additionally
one can specify the slider precision for the double value. The precision
is measured 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 java.lang.String getType()
getType
in class ObjectOptionItem
public void setValue(java.lang.Object value)
setValue
in class ObjectOptionItem
java.lang.IllegalArgumentException
- if the specified value
is
not of type Double
OptionItem.publishValue(Object)
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |