Package gov.nasa.gsfc.spdf.ssc
Class FormatOptions
- java.lang.Object
-
- gov.nasa.gsfc.spdf.ssc.FormatOptions
-
public class FormatOptions extends java.lang.Object
This class represents output format and units options.- Version:
- $Revison: $
- Author:
- B. Harris
-
-
Constructor Summary
Constructors Constructor Description FormatOptions()
Constructs a FormatOptions object with a default value.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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DateFormat
getDateFormat()
Gets the date format listing option.DegreeFormat
getDegreeFormat()
Gets the "format for degrees" listing option.short
getDegreePrecision()
Gets the degreePrecison value.short
getDistancePrecision()
Gets the distancePrecison value.DistanceUnits
getDistanceUnits()
Gets the "units for distance" format listing option.LatLonFormat
getLatLonFormat()
Gets the "format for direction/range" listing option.short
getLinesPerPage()
Gets the number of lines per page when output is to a text file.TimeFormat
getTimeFormat()
Gets the time format listing option.boolean
isCdf()
Gets the flag indicating whether the output is to be a CDF file.void
list(java.io.PrintStream out)
Prints this object's value to the specified output stream.void
setCdf(boolean value)
Sets the flag indicating whether the output is to be a CDF file.void
setDateFormat(DateFormat value)
Sets the date format listing option.void
setDegreeFormat(DegreeFormat value)
Sets the "format for degrees" listing option.void
setDegreePrecision(short value)
Sets the degreePrecison value.void
setDistancePrecision(short value)
Sets the distancePrecison value.void
setDistanceUnits(DistanceUnits value)
Sets the "units for distance" format listing option.void
setLatLonFormat(LatLonFormat value)
Sets the "format for direction/range" listing option.void
setLinesPerPage(short value)
Sets the number of lines per page when output is to a text file.void
setTimeFormat(TimeFormat value)
Sets the time format listing option.
-
-
-
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 valuestimeFormat
- specifies the format for time valuesdistanceUnits
- specifies the units for distance valuesdistancePrecision
- specifies the number of decimal places to include when displaying distance valuesdegreeFormat
- specifies the format for degree valuesdegreePrecision
- specifies the number of decimal places to include when displaying degree values with degreeUnits format of 0latLonFormat
- specifies the format for direction/range valuescdf
- specifies whether the output is to be a CDF filelinesPerPage
- number of lines per page when output is to a text file
-
-
Method Detail
-
getDateFormat
public DateFormat getDateFormat()
Gets the date format listing option.- Returns:
- date format listing option
- See Also:
setDateFormat(gov.nasa.gsfc.spdf.ssc.DateFormat)
-
setDateFormat
public void setDateFormat(DateFormat value)
Sets the date format listing option.- Parameters:
value
- new value- See Also:
getDateFormat()
-
getTimeFormat
public TimeFormat getTimeFormat()
Gets the time format listing option.- Returns:
- time format listing option
- See Also:
setTimeFormat(gov.nasa.gsfc.spdf.ssc.TimeFormat)
-
setTimeFormat
public void setTimeFormat(TimeFormat value)
Sets the time format listing option.- Parameters:
value
- new value- See Also:
getTimeFormat()
-
getDistanceUnits
public DistanceUnits getDistanceUnits()
Gets the "units for distance" format listing option.- Returns:
- "units for distance" format listing option
- See Also:
setDistanceUnits(gov.nasa.gsfc.spdf.ssc.DistanceUnits)
-
setDistanceUnits
public void setDistanceUnits(DistanceUnits value)
Sets the "units for distance" format listing option.- Parameters:
value
- new value- See Also:
getDistanceUnits()
,setDistancePrecision(short)
-
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()
-
getDegreeFormat
public DegreeFormat getDegreeFormat()
Gets the "format for degrees" listing option.- Returns:
- "format for degrees" listing option
- See Also:
setDegreeFormat(gov.nasa.gsfc.spdf.ssc.DegreeFormat)
-
setDegreeFormat
public void setDegreeFormat(DegreeFormat value)
Sets the "format for degrees" listing option.- Parameters:
value
- new value- See Also:
getDegreeFormat()
,setDegreePrecision(short)
-
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)
-
setDegreePrecision
public void setDegreePrecision(short value)
Sets the degreePrecison value. That is, the number of decimal places to include when displaying degree values with a degreeUnits format of DECIMAL.- Parameters:
value
- new value- See Also:
getDegreePrecision()
,setDegreeFormat(gov.nasa.gsfc.spdf.ssc.DegreeFormat)
-
getLatLonFormat
public LatLonFormat getLatLonFormat()
Gets the "format for direction/range" listing option.- Returns:
- "format for direction/range" listing option
- See Also:
setLatLonFormat(gov.nasa.gsfc.spdf.ssc.LatLonFormat)
-
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
-
-