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[]DIRECTIONSThe 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 StringBufferformat(double number, StringBuffer toAppendTo, FieldPosition pos)StringBufferformat(long number, StringBuffer toAppendTo, FieldPosition pos)StringgetDirectionCode(double direction)Returns a string representing the direction.Numberparse(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, setRoundingModeMethods 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:
formatin classNumberFormat
-
format
- Specified by:
formatin classNumberFormat
-
parse
- Specified by:
parsein classNumberFormat
-