    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class ncsa.horizon.coordinates.formatters.DDMMSSAxisPosFormatter

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

public class DDMMSSAxisPosFormatter
extends Object
implements AxisPosFormatter

support for printing out angles in degrees:minutes:seconds format

##

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

##

DDMMSSAxisPosFormatter()

##

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

##

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

MAX_PREC

      public final static int MAX_PREC

  the maximum precision supported = 4.

myname

      protected final static String myname

##

DDMMSSAxisPosFormatter

      public DDMMSSAxisPosFormatter()

##

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 degree 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

toString

      public String toString(double degrees)

  format value into a string with default precision

valueOf

      public double valueOf(String s) throws NumberFormatException

  parse a string for a double value.

clone

      public Object clone()

Overrides:
  clone in class Object

toString

      public String toString()

Overrides:
  toString in class Object

main

      public static void main(String args[])

    All Packages  Class Hierarchy  This Package  Previous  Next  Index