Package org.jfree.chart.axis
Class CompassFormat
java.lang.Object
java.text.Format
java.text.NumberFormat
org.jfree.chart.axis.CompassFormat
- All Implemented Interfaces:
Serializable
,Cloneable
public class CompassFormat extends NumberFormat
A formatter that displays numbers as directions.
- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from class java.text.NumberFormat
NumberFormat.Field, NumberFormat.Style
-
Field Summary
Fields Modifier and Type Field Description static String[]
DIRECTIONS
The directions.Fields inherited from class java.text.NumberFormat
FRACTION_FIELD, INTEGER_FIELD
-
Constructor Summary
Constructors Constructor Description CompassFormat()
Creates a new formatter. -
Method Summary
Modifier and Type Method Description StringBuffer
format(double number, StringBuffer toAppendTo, FieldPosition pos)
StringBuffer
format(long number, StringBuffer toAppendTo, FieldPosition pos)
String
getDirectionCode(double direction)
Returns a string representing the direction.Number
parse(String source, ParsePosition parsePosition)
Methods inherited from class java.text.NumberFormat
clone, equals, format, format, format, getAvailableLocales, getCompactNumberInstance, getCompactNumberInstance, getCurrency, getCurrencyInstance, getCurrencyInstance, getInstance, getInstance, getIntegerInstance, getIntegerInstance, getMaximumFractionDigits, getMaximumIntegerDigits, getMinimumFractionDigits, getMinimumIntegerDigits, getNumberInstance, getNumberInstance, getPercentInstance, getPercentInstance, getRoundingMode, hashCode, isGroupingUsed, isParseIntegerOnly, parse, parseObject, setCurrency, setGroupingUsed, setMaximumFractionDigits, setMaximumIntegerDigits, setMinimumFractionDigits, setMinimumIntegerDigits, setParseIntegerOnly, setRoundingMode
Methods inherited from class java.text.Format
format, formatToCharacterIterator, parseObject
-
Field Details
-
DIRECTIONS
The directions.
-
-
Constructor Details
-
CompassFormat
public CompassFormat()Creates a new formatter.
-
-
Method Details
-
getDirectionCode
Returns a string representing the direction.- Parameters:
direction
- the direction.- Returns:
- a string.
-
format
- Specified by:
format
in classNumberFormat
-
format
- Specified by:
format
in classNumberFormat
-
parse
- Specified by:
parse
in classNumberFormat
-