Package org.graffiti.plugin.parameter
Class AbstractLimitableParameter
java.lang.Object
org.graffiti.plugin.parameter.AbstractSingleParameter
org.graffiti.plugin.parameter.AbstractLimitableParameter
- All Implemented Interfaces:
Displayable,LimitableParameter,Parameter,SingleParameter
- Direct Known Subclasses:
DoubleParameter,FloatParameter,IntegerParameter
public abstract class AbstractLimitableParameter extends AbstractSingleParameter implements LimitableParameter
This abstract class provides a default implementation for the
toXMLString method and specifies an interval size between the
limitable parameter's values to be implemented for finer input control.- Version:
- 2.6.5
- Recent revisions:
- 2.6.5
-
Constructor Summary
Constructors Constructor Description AbstractLimitableParameter(String name, String description)Constructs a new abstract limitable parameter. -
Method Summary
Modifier and Type Method Description abstract NumbergetValuesBall()The closed ball diameter exclusive for the current parameter value, such that
v(t) = val
v(t+1) = (val +|- ballDiameter)
whereas t stands for time point.StringtoXMLString()Returns a well-formed XML string representing the Displayable.Methods inherited from class org.graffiti.plugin.parameter.AbstractSingleParameter
getDescription, getIcon, getImage, getName, getValue, isLeftAligned, setDescription, setLeftAligned, setValue, toStringMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.graffiti.plugin.Displayable
getDescription, getIcon, getName, getValue, setDescription, setValueMethods inherited from interface org.graffiti.plugin.parameter.LimitableParameter
getMax, getMin, isValid
-
Constructor Details
-
AbstractLimitableParameter
Constructs a new abstract limitable parameter.- Parameters:
name- the name of the parameter.description- the description of the parameter.
-
-
Method Details
-
toXMLString
Description copied from interface:DisplayableReturns a well-formed XML string representing the Displayable. The Displayable should be reconstructable via this representation. Therefore it must at least include the type of Displayable (classname) and a representation of its value. PROBABLE FUTURE DESIGN: The Displayables themselves will provide a method to reconstruct their value from the XML representation they provided.- Specified by:
toXMLStringin interfaceDisplayable- Overrides:
toXMLStringin classAbstractSingleParameter- Returns:
- string holding an XML representation of this Displayable
-
getValuesBall
The closed ball diameter exclusive for the current parameter value, such that
v(t) = val
v(t+1) = (val +|- ballDiameter)
whereas t stands for time point.- Returns:
- a Number instance
-