org.indi.objects
Class Number

java.lang.Object
  extended by org.indi.objects.Object<Object>
      extended by org.indi.objects.Element
          extended by org.indi.objects.Number
All Implemented Interfaces:
java.io.Serializable

public class Number
extends Element

A single indi number

Author:
Dirk Hünniger
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.indi.objects.Element
label, name, value
 
Fields inherited from class org.indi.objects.Object
children, message, transferType
 
Constructor Summary
Number(java.lang.String name, java.lang.String value)
          class constructor
Number(java.lang.String name, java.lang.String label, java.lang.String format, double min, double max, double step, double value)
          class constructor
 
Method Summary
 void addDouble(double d)
          add a double to the current value
 double getDouble()
          return the value of the number as double
 java.lang.String getStartTag(TransferType type)
          Get the opening XML tag for the element
protected  java.lang.String getType()
           
 void setDouble(double d)
          set the value of the number by a double
 void subtractDouble(double d)
          subtract a double from the current value
 
Methods inherited from class org.indi.objects.Element
getEndTag, getName, getValue, getXML, hashCode, oEquals, setValue
 
Methods inherited from class org.indi.objects.Object
equals, getChildren, getMessage, getTransferType, getXML, setTransferType, treeEquals
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Number

public Number(java.lang.String name,
              java.lang.String label,
              java.lang.String format,
              double min,
              double max,
              double step,
              double value)
class constructor

Parameters:
name - the name of the Number
label - the label of the Number (to be used for display in the GUI)
format - the format string used by the client to display the number
min - the minimum value of the number
max - the maximum value of the number
step - the step in with the gui may increase decrease the number
value - the value of the number

Number

public Number(java.lang.String name,
              java.lang.String value)
class constructor

Parameters:
name - the name of the Number
value - the value of the number
Method Detail

getDouble

public double getDouble()
return the value of the number as double

Returns:

setDouble

public void setDouble(double d)
set the value of the number by a double

Parameters:
d - the new value to be set

addDouble

public void addDouble(double d)
add a double to the current value

Parameters:
d - the value to be added

subtractDouble

public void subtractDouble(double d)
subtract a double from the current value

Parameters:
d - the value to be subtracted

getStartTag

public java.lang.String getStartTag(TransferType type)
Description copied from class: Element
Get the opening XML tag for the element

Overrides:
getStartTag in class Element
Parameters:
type - the transfertype to be used
Returns:
the generated opening tag

getType

protected java.lang.String getType()
Specified by:
getType in class Element
Returns:
the type of the indi element


Copyright © 2008. All Rights Reserved.