| Overview | Package | Class | Tree | Deprecated | Index | Help | |||
| PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||
java.lang.Object | +--ncsa.horizon.coordinates.formatters.HHMMSSAxisPosFormatter
| Field Summary | |
| static int | DEF_PREC
default precision = 1. This is default number of digits to the right of the decimal in the seconds field |
| java.text.DecimalFormat | fmt
the format object used to format the seconds field |
| static int | MAX_PREC
the maximum precision supported = 16. |
| static java.lang.String | myname
|
| int | prec
the precision code |
| Constructor Summary | |
| HHMMSSAxisPosFormatter()
|
|
| Method Summary | |
| java.lang.Object | clone()
|
| int | getPrecision()
return the currently set precision |
| static void | main(java.lang.String[] args)
|
| void | setPrecision(int precision)
set the precision of the output formatting |
| java.lang.String | toString(double degrees,
int precision)
return a value as a string with a specified precision |
| java.lang.String | toString(double degrees)
format value into a string |
| java.lang.String | toString()
|
| double | valueOf(java.lang.String s)
parse a string for a double value. |
| Methods inherited from class java.lang.Object | |
| clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait | |
| Field Detail |
public static final int DEF_PREC
public static final int MAX_PREC
protected java.text.DecimalFormat fmt
protected int prec
protected static final java.lang.String myname
| Constructor Detail |
public HHMMSSAxisPosFormatter()
| Method Detail |
public void setPrecision(int precision)
prec
- the number of places right of the decimal point.
Precision can have the following ranges:
< -2 print default precision (2)
-2 only the nearest hour should be printed.
-1 print value to the nearest minute.
0 print value to the nearest second (with no decimal point).
>= 1 print value with prec number of digits right of the
decimal in the seconds field
public int getPrecision()
public java.lang.String toString(double degrees,
int precision)
val
- the input value
prec
- the number of places right of the decimal point.
Precision can have the following ranges:
< 2 print with "natural" precision (whatever Java gives it)
-2 only the nearest hour should be printed.
-1 print value to the nearest minute.
0 print value to the nearest second (with no decimal point).
>= 1 print value with prec number of digits right of the
decimal in the seconds field
public java.lang.String toString(double degrees)
public double valueOf(java.lang.String s)
throws java.lang.NumberFormatException
public java.lang.Object clone()
public java.lang.String toString()
public static void main(java.lang.String[] args)
| Overview | Package | Class | Tree | Deprecated | Index | Help | |||
| PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||