jApp
Class DoubleVariable
java.lang.Object
jApp.Changeable
jApp.Variable
jApp.DoubleVariable
- All Implemented Interfaces:
- ValueInterface
public class DoubleVariable
- extends Variable
Method Summary |
void |
setValue(double value)
|
void |
setValue(java.lang.Object value)
|
void |
showAlertDialog(int cause,
Unit unit)
Provided so that derived classes can provide their own specic alert
dialogs in case an attempt is made to set the variable to an unacceptable
value. |
int |
validate(java.lang.Object value)
Validates the value and returns a constant describing the result |
boolean |
valueEquals(java.lang.Object value)
Compares the equality of the variables value. |
Methods inherited from class jApp.Variable |
booleanValue, doubleValue, getValue, intValue, isEnabled, longValue, numberOfValues, readVariables, setEnabled, stringValue, writeVariables |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DoubleVariable
public DoubleVariable(double v,
double min,
double max)
DoubleVariable
public DoubleVariable(double v)
DoubleVariable
public DoubleVariable()
valueEquals
public boolean valueEquals(java.lang.Object value)
- Description copied from class:
Variable
- Compares the equality of the variables value.
- Overrides:
valueEquals
in class Variable
- Parameters:
value
- the value to compare to the varible value.
- Returns:
- true if the values are
equal
setValue
public void setValue(double value)
setValue
public void setValue(java.lang.Object value)
- Specified by:
setValue
in interface ValueInterface
- Overrides:
setValue
in class Variable
showAlertDialog
public void showAlertDialog(int cause,
Unit unit)
- Description copied from class:
Variable
- Provided so that derived classes can provide their own specic alert
dialogs in case an attempt is made to set the variable to an unacceptable
value.
s * @param cause
an int value (defined by a derived class) that is the cause of
the aler
- Specified by:
showAlertDialog
in interface ValueInterface
- Overrides:
showAlertDialog
in class Variable
unit
- the unit in which to express the variable value or the value
range.
validate
public int validate(java.lang.Object value)
- Description copied from class:
Variable
- Validates the value and returns a constant describing the result
- Specified by:
validate
in interface ValueInterface
- Overrides:
validate
in class Variable
- Parameters:
value
- the value to validate
- Returns:
- by default returns
ValueInterface.VALUE_VALID