|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cosylab.gui.components.numberfield.AngleNumberDescriptor
public class AngleNumberDescriptor
AnglesNumberDescriptor displays double as angle string.
Field Summary | |
---|---|
static java.lang.String |
DESCRIPTION
|
static java.lang.String |
NAME
|
Constructor Summary | |
---|---|
AngleNumberDescriptor()
Creates a new AngleNumberDescriptor object. |
|
AngleNumberDescriptor(boolean full)
Creates a new AngleNumberDescriptor object. |
|
AngleNumberDescriptor(char degreeSeparator,
char minuteSeparator,
char secondSeparator)
Creates a new AngleNumberDescriptor with specified separator characters. |
|
AngleNumberDescriptor(char degreeSeparator,
char minuteSeparator,
char secondSeparator,
boolean full)
Creates a new AngleNumberDescriptor with specified separator characters. |
Method Summary | |
---|---|
char |
getDegreeSeparator()
Separator printed after integral part of number, thus degree sign ° by default. |
java.lang.String |
getFormat()
Returns the format |
char |
getMinuteSeparator()
Separator printed after integral part of minutes, thus minutes sign ' in degree notation by default. |
java.lang.Class |
getNumberType()
Returns last set number type. |
char |
getSecondSeparator()
Separator printed after seconds (60 seconds is one minute), thus seconds sign " in degree notation by default. |
boolean |
isUseFullFormat()
If true then value is printed in full format with all
separators, thus 0 is printed as 00°00'00" |
static void |
main(java.lang.String[] args)
Test applet |
java.lang.Number |
parseNumber(java.lang.String number)
Parses string and creates Number . |
java.lang.String |
printEditString(java.lang.Number number)
Converts provided Number to a string, which is displayed
when NumberField enters in to edit mode and wants to edit value. |
java.lang.String |
printString(java.lang.Number number)
Converts provided Number to a string, which is used for
displaying the value. |
void |
setDegreeSeparator(char degreeSeparator)
Separator printed after integral part of number, thus degree sign ° by default. |
void |
setFormat(java.lang.String newFormat)
Set the Number format |
void |
setMinuteSeparator(char minuteSeparator)
Sets separator printed after integral part of minutes (60 minutes is one degree), thus minutes sign ' in degree notation by default. |
void |
setNumberType(java.lang.Class newNumberFormat)
Sets number type to descriptor, ame as used on number field. |
void |
setSecondSeparator(char secondSeparator)
Sets separator printed after seconds (60 seconds is one minute), thus seconds sign " in degree notation by default. |
void |
setUseFullFormat(boolean useFullFormat)
If set to true then value is printed in full format with
all separators, thus 0 is printed as 00°00'00" |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String NAME
NumberDescriptor
,
Constant Field Valuespublic static final java.lang.String DESCRIPTION
NumberDescriptor
,
Constant Field ValuesConstructor Detail |
---|
public AngleNumberDescriptor()
public AngleNumberDescriptor(boolean full)
full
- if true
number is printed in full formatpublic AngleNumberDescriptor(char degreeSeparator, char minuteSeparator, char secondSeparator)
degreeSeparator
- separator after degree part of valueminuteSeparator
- separator after minutes part of valuesecondSeparator
- separator after seconds part of value, if 0 it is
not diplayed.public AngleNumberDescriptor(char degreeSeparator, char minuteSeparator, char secondSeparator, boolean full)
degreeSeparator
- separator after degree part of valueminuteSeparator
- separator after minutes part of valuesecondSeparator
- separator after seconds part of value, if 0 it is
not diplayed.full
- if true
number is printed in full formatMethod Detail |
---|
public static void main(java.lang.String[] args)
args
- cmdpublic java.lang.Number parseNumber(java.lang.String number)
NumberDescriptor
Number
. If string is not
presentation of a number and can not be parsed, then null must be
returned.
parseNumber
in interface NumberDescriptor
number
- a string representing a number
Number
or null
if string
can not be parsedpublic java.lang.String printString(java.lang.Number number)
NumberDescriptor
Number
to a string, which is used for
displaying the value.
printString
in interface NumberDescriptor
number
- a number to be transformed to string
String
representing a number.public java.lang.String printEditString(java.lang.Number number)
NumberDescriptor
Number
to a string, which is displayed
when NumberField enters in to edit mode and wants to edit value. Edit
string is usually stripped from unnecessary characters and prepared for
easyer user editing.
printEditString
in interface NumberDescriptor
number
- a number to be transformed to string
String
representation a number prepared for
editing.public java.lang.String getFormat()
NumberDescriptor
getFormat
in interface NumberDescriptor
public void setFormat(java.lang.String newFormat)
NumberDescriptor
setFormat
in interface NumberDescriptor
public void setNumberType(java.lang.Class newNumberFormat)
NumberDescriptor
setNumberType
in interface NumberDescriptor
newNumberFormat
- number typepublic java.lang.Class getNumberType()
NumberDescriptor
getNumberType
in interface NumberDescriptor
public char getDegreeSeparator()
public char getMinuteSeparator()
public void setMinuteSeparator(char minuteSeparator)
minuteSeparator
- new separator after minutes partpublic char getSecondSeparator()
public void setSecondSeparator(char secondSeparator)
secondSeparator
- new separator after seconds partpublic void setDegreeSeparator(char degreeSeparator)
degreeSeparator
- new separator after degree partpublic boolean isUseFullFormat()
true
then value is printed in full format with all
separators, thus 0 is printed as 00°00'00"
true
number is printed in full formatpublic void setUseFullFormat(boolean useFullFormat)
true
then value is printed in full format with
all separators, thus 0 is printed as 00°00'00"
useFullFormat
- new full print flag
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |