Class ncsa.horizon.coordinates.formatters.HHMMSSAxisPosFormatter
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ncsa.horizon.coordinates.formatters.HHMMSSAxisPosFormatter

java.lang.Object
   |
   +----ncsa.horizon.coordinates.formatters.HHMMSSAxisPosFormatter

public class HHMMSSAxisPosFormatter
extends Object
implements AxisPosFormatter
support for printing out angles in hours:minutes:seconds format over the circular range 0, 24 hours.

Variable Index

 o DEF_PREC
default precision = 2.
 o MAX_PREC
the maximum precision supported = 4.
 o myname

Constructor Index

 o HHMMSSAxisPosFormatter()

Method Index

 o clone()
 o main(String[])
 o toString()
 o toString(double)
format value into a string with default precision
 o toString(double, int)
return a value as a string with a specified precision
 o valueOf(String)
parse a string for a double value.

Variables

 o DEF_PREC
  public final static int DEF_PREC
default precision = 2. This is default number of digits to the right of the decimal in the seconds field
 o MAX_PREC
  public final static int MAX_PREC
the maximum precision supported = 4.
 o myname
  protected final static String myname

Constructors

 o HHMMSSAxisPosFormatter
  public HHMMSSAxisPosFormatter()

Methods

 o toString
  public String toString(double degrees,
                         int prec)
return a value as a string with a specified precision
Parameters:
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
 o toString
  public String toString(double degrees)
format value into a string with default precision
 o valueOf
  public double valueOf(String s) throws NumberFormatException
parse a string for a double value.
 o clone
  public Object clone()
Overrides:
clone in class Object
 o toString
  public String toString()
Overrides:
toString in class Object
 o main
  public static void main(String args[])

All Packages  Class Hierarchy  This Package  Previous  Next  Index