DESY ACOP Beans Home

com.cosylab.gui.components.wheelswitch
Class RadialWheelswitchFormatter

java.lang.Object
  extended by com.cosylab.gui.components.wheelswitch.AbstractWheelswitchFormatter
      extended by com.cosylab.gui.components.wheelswitch.RadialWheelswitchFormatter

public class RadialWheelswitchFormatter
extends AbstractWheelswitchFormatter

Extension of the abstract wheelswitch formatter for formatting numeric strings representing angular values in format of ddddmmss, where d are angular degrees, m are angular minutes in the range of 0-59 and s are angular seconds also in the range of 0-59. The number of digits representing m and s is fixed to 2 per m and 2 per s, while d are assumed to take all the remaining digits up front. In the format string passed to the formatter all the decimal digits are ingored and only the leading (integer) digits are counted when determining the right formatted value string. If the format string does not contain enough integer digits to display the whole number, new digits are automatically added to the value string.

Version:
$id$
Author:
Jernej Kamenik

Field Summary
 
Fields inherited from class com.cosylab.gui.components.wheelswitch.AbstractWheelswitchFormatter
debug, defFormatter, formatString, formatter, generatedFormatString, maximum, maximumDigits, minimum, unit, value, valueString
 
Constructor Summary
RadialWheelswitchFormatter()
          Constructs the PlainWheelswitchFormatter with no format string.
RadialWheelswitchFormatter(java.lang.String newFormatString)
          Constructs the PlainWheelswitchFormatter and sets the format string.
 
Method Summary
protected  void internalSetString(java.lang.String newValueString)
           
 void setFormat(java.lang.String newFormatString)
          Sets the format string specifiing the format of Wheelswitch display.
 
Methods inherited from class com.cosylab.gui.components.wheelswitch.AbstractWheelswitchFormatter
checkFormat, generateFormat, getFormat, getMaximum, getMaximumDigits, getMinimum, getString, getUnit, getValue, setMaximum, setMaximumDigits, setMinimum, setString, setUnit, setValue, transformFormat
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RadialWheelswitchFormatter

public RadialWheelswitchFormatter(java.lang.String newFormatString)
Constructs the PlainWheelswitchFormatter and sets the format string.

Parameters:
newFormatString -
See Also:
setFormat(String)

RadialWheelswitchFormatter

public RadialWheelswitchFormatter()
Constructs the PlainWheelswitchFormatter with no format string.

See Also:
setFormat(String)
Method Detail

setFormat

public void setFormat(java.lang.String newFormatString)
               throws java.lang.IllegalArgumentException
Description copied from class: AbstractWheelswitchFormatter
Sets the format string specifiing the format of Wheelswitch display. The format is first checked for validity by the checkFormat(String) method.

Overrides:
setFormat in class AbstractWheelswitchFormatter
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!
See Also:
Double.parseDouble(String), NumberFormatException

internalSetString

protected void internalSetString(java.lang.String newValueString)
Specified by:
internalSetString in class AbstractWheelswitchFormatter


Copyright © 2010. All Rights Reserved.