DESY ACOP Beans Home

com.cosylab.gui.components.numberfield
Class Rad2DegNumberDescriptor

java.lang.Object
  extended by com.cosylab.gui.components.numberfield.AngleNumberDescriptor
      extended by com.cosylab.gui.components.numberfield.Rad2DegNumberDescriptor
All Implemented Interfaces:
NumberDescriptor

public class Rad2DegNumberDescriptor
extends AngleNumberDescriptor

Visualize double value in radians by converting it to degrees and displays it in format XX°XX'XX\".

Author:
Igor Kriznar

Field Summary
static java.lang.String DESCRIPTION
           
static java.lang.String NAME
           
 
Constructor Summary
Rad2DegNumberDescriptor()
           
Rad2DegNumberDescriptor(boolean full)
          Constructs a new Rad2DegNumberDescriptor.
Rad2DegNumberDescriptor(char degreeSeparator, char minuteSeparator, char secondSeparator)
          Constructs a new Rad2DegNumberDescriptor.
Rad2DegNumberDescriptor(char degreeSeparator, char minuteSeparator, char secondSeparator, boolean full)
          Constructs a new Rad2DegNumberDescriptor.
 
Method Summary
 java.lang.Number parseNumber(java.lang.String number)
          Parses string and creates Number.
 java.lang.String printString(java.lang.Number number)
          Converts provided Number to a string, which is used for displaying the value.
 
Methods inherited from class com.cosylab.gui.components.numberfield.AngleNumberDescriptor
getDegreeSeparator, getFormat, getMinuteSeparator, getNumberType, getSecondSeparator, isUseFullFormat, main, printEditString, setDegreeSeparator, setFormat, setMinuteSeparator, setNumberType, setSecondSeparator, setUseFullFormat
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final java.lang.String NAME
See Also:
NumberDescriptor, Constant Field Values

DESCRIPTION

public static final java.lang.String DESCRIPTION
See Also:
NumberDescriptor, Constant Field Values
Constructor Detail

Rad2DegNumberDescriptor

public Rad2DegNumberDescriptor()

Rad2DegNumberDescriptor

public Rad2DegNumberDescriptor(boolean full)
Constructs a new Rad2DegNumberDescriptor.

Parameters:
full - should full format be used
See Also:
AngleNumberDescriptor.setUseFullFormat(boolean)

Rad2DegNumberDescriptor

public Rad2DegNumberDescriptor(char degreeSeparator,
                               char minuteSeparator,
                               char secondSeparator)
Constructs a new Rad2DegNumberDescriptor.

Parameters:
degreeSeparator -
minuteSeparator -
secondSeparator -

Rad2DegNumberDescriptor

public Rad2DegNumberDescriptor(char degreeSeparator,
                               char minuteSeparator,
                               char secondSeparator,
                               boolean full)
Constructs a new Rad2DegNumberDescriptor.

Parameters:
degreeSeparator -
minuteSeparator -
secondSeparator -
full - should full format be used
See Also:
AngleNumberDescriptor.setUseFullFormat(boolean)
Method Detail

printString

public java.lang.String printString(java.lang.Number number)
Description copied from interface: NumberDescriptor
Converts provided Number to a string, which is used for displaying the value.

Specified by:
printString in interface NumberDescriptor
Overrides:
printString in class AngleNumberDescriptor
Parameters:
number - a number to be transformed to string
Returns:
a String representing a number.

parseNumber

public java.lang.Number parseNumber(java.lang.String number)
Description copied from interface: NumberDescriptor
Parses string and creates Number. If string is not presentation of a number and can not be parsed, then null must be returned.

Specified by:
parseNumber in interface NumberDescriptor
Overrides:
parseNumber in class AngleNumberDescriptor
Parameters:
number - a string representing a number
Returns:
instance of Number or null if string can not be parsed


Copyright © 2010. All Rights Reserved.