Class FormatOptions


  • public class FormatOptions
    extends java.lang.Object
    This class represents output format and units options.
    Version:
    $Revison: $
    Author:
    B. Harris
    • Constructor Detail

      • FormatOptions

        public FormatOptions()
        Constructs a FormatOptions object with a default value.
      • FormatOptions

        public FormatOptions​(DateFormat dateFormat,
                             TimeFormat timeFormat,
                             DistanceUnits distanceUnits,
                             short distancePrecision,
                             DegreeFormat degreeFormat,
                             short degreePrecision,
                             LatLonFormat latLonFormat,
                             boolean cdf,
                             short linesPerPage)
        Constructs a FormatOptions object with the given attribute values.
        Parameters:
        dateFormat - specifies the format for date values
        timeFormat - specifies the format for time values
        distanceUnits - specifies the units for distance values
        distancePrecision - specifies the number of decimal places to include when displaying distance values
        degreeFormat - specifies the format for degree values
        degreePrecision - specifies the number of decimal places to include when displaying degree values with degreeUnits format of 0
        latLonFormat - specifies the format for direction/range values
        cdf - specifies whether the output is to be a CDF file
        linesPerPage - number of lines per page when output is to a text file
    • Method Detail

      • setDateFormat

        public void setDateFormat​(DateFormat value)
        Sets the date format listing option.
        Parameters:
        value - new value
        See Also:
        getDateFormat()
      • setTimeFormat

        public void setTimeFormat​(TimeFormat value)
        Sets the time format listing option.
        Parameters:
        value - new value
        See Also:
        getTimeFormat()
      • getDistancePrecision

        public short getDistancePrecision()
        Gets the distancePrecison value. That is, the number of decimal places to include when displaying distance values in scientific notation.
        Returns:
        distancePrecision value
        See Also:
        setDistancePrecision(short)
      • setDistancePrecision

        public void setDistancePrecision​(short value)
        Sets the distancePrecison value. That is, the number of decimal places to include when displaying distance values in scientific notation.
        Parameters:
        value - new value
        See Also:
        getDistancePrecision()
      • getDegreePrecision

        public short getDegreePrecision()
        Gets the degreePrecison value. That is, the number of decimal places to include when displaying degree values with a degreeUnits format of 0.
        Returns:
        degreePrecision value
        See Also:
        setDegreePrecision(short)
      • setLatLonFormat

        public void setLatLonFormat​(LatLonFormat value)
        Sets the "format for direction/range" listing option.
        Parameters:
        value - new value
        See Also:
        getLatLonFormat()
      • isCdf

        public boolean isCdf()
        Gets the flag indicating whether the output is to be a CDF file.
        Returns:
        true if output is a CDF file, false if output is a text file
        See Also:
        setCdf(boolean)
      • setCdf

        public void setCdf​(boolean value)
        Sets the flag indicating whether the output is to be a CDF file. A value of false indicates the output is to be a text file.
        Parameters:
        value - new value
        See Also:
        isCdf()
      • getLinesPerPage

        public short getLinesPerPage()
        Gets the number of lines per page when output is to a text file.
        Returns:
        number of lines per page
        See Also:
        setLinesPerPage(short)
      • setLinesPerPage

        public void setLinesPerPage​(short value)
        Sets the number of lines per page when output is to a text file.
        Parameters:
        value - new value
        See Also:
        getLinesPerPage()
      • list

        public void list​(java.io.PrintStream out)
        Prints this object's value to the specified output stream. This method is useful for debugging.
        Parameters:
        out - an output stream