|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.fopps.model.AbstractItem
|
+--org.fopps.model.TreeItem
|
+--org.fopps.model.Feature
|
+--org.fopps.model.NumericFeature
NumericFeature is a special kind of feature and represents numeric values. Numeric features are not able to have child nodes, since NumericFeature is intended for non-discrete values (e. g. calibration parameters) and the number of children may be infinite.
If the range of values is small and discrete, use alternatives instead of a numeric features.
| Field Summary | |
static java.lang.Number |
ZERO_BYTE
|
static java.lang.Number |
ZERO_DOUBLE
|
static java.lang.Number |
ZERO_FLOAT
|
static java.lang.Number |
ZERO_INTEGER
|
static java.lang.Number |
ZERO_LONG
|
static java.lang.Number |
ZERO_SHORT
|
| Fields inherited from class org.fopps.model.Feature |
ROOT_FEATURE_NAME |
| Fields inherited from class org.fopps.model.TreeItem |
mChildren, mParent |
| Fields inherited from class org.fopps.model.AbstractItem |
ADDED_EVENT, CHANGE_EVENT, name, REMOVED_EVENT |
| Constructor Summary | |
NumericFeature(java.lang.String name,
TreeItem mParent,
Validator pValidator)
Creates a new numeric feature. |
|
NumericFeature(java.lang.String name,
Validator pValidator)
Same as NumericFeature(name, null, pValidator) |
|
| Method Summary | |
java.lang.Number |
getDefaultValue()
Returns the default value |
Validator |
getValidator()
Returns the current validator instance or null, if no validator has been assigned. |
java.lang.Number |
getValue()
Returns the current value of the feature |
boolean |
isAlternative()
Returns true, if feature is an alternative. |
protected boolean |
isValid(java.lang.Number pValue)
|
void |
setAlternative(boolean alternative)
Does nothing, since numeric features cannot have child nodes. |
void |
setDefaultValue(java.lang.Number pDefaultValue)
Sets a new default value. |
void |
setToDefault()
Sets the value to the default value. |
void |
setValue(java.lang.Number pValue)
Sets a new value. |
| Methods inherited from class org.fopps.model.Feature |
addAttachment, buildSymbolicVar, createDefaultVar, fireItemChanged, getAttachments, getBinding, getSymbolicVar, hasAttachments, isAvailable, isEnabledByDefault, isOptional, removeAllAttachments, removeAttachment, setAttachments, setAvailable, setBinding, setEnabledByDefault, setOptional, setSymbolicVar, toString, validateAttachments |
| Methods inherited from class org.fopps.model.TreeItem |
addChildren, allChildrenCount, childrenAllowed, childrenCount, delete, first, getChildAt, getChildren, getDepth, getIndexOfChild, getParent, getPath, getRoot, isLeaf, last, notifyListeners, removeAllChildren, removeAllChildrenRecursive, removeChildren, setChildren, setParent |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.Number ZERO_BYTE
public static final java.lang.Number ZERO_SHORT
public static final java.lang.Number ZERO_LONG
public static final java.lang.Number ZERO_INTEGER
public static final java.lang.Number ZERO_DOUBLE
public static final java.lang.Number ZERO_FLOAT
| Constructor Detail |
public NumericFeature(java.lang.String name,
Validator pValidator)
NumericFeature(name, null, pValidator)
public NumericFeature(java.lang.String name,
TreeItem mParent,
Validator pValidator)
name - name of the featuremParent - Parent featurepValidator - Validator instance to verify valid values| Method Detail |
public boolean isAlternative()
isAlternative in class Featurepublic void setAlternative(boolean alternative)
setAlternative in class Featurepublic Validator getValidator()
public java.lang.Number getDefaultValue()
public void setDefaultValue(java.lang.Number pDefaultValue)
throws ValidatorException
ValidatorException, - if value was not accepted by the validator
ValidatorExceptionsetToDefault()public java.lang.Number getValue()
public void setValue(java.lang.Number pValue)
throws ValidatorException
ValidatorException, - if value was not accepted by the validator
ValidatorExceptionpublic void setToDefault()
setDefaultValue(java.lang.Number)
protected boolean isValid(java.lang.Number pValue)
throws ValidatorException
ValidatorException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||