public class

CompassFormat

extends NumberFormat
java.lang.Object
   ↳ java.text.Format
     ↳ java.text.NumberFormat
       ↳ org.jfree.chart.axis.CompassFormat

Class Overview

A formatter that displays numbers as directions.

Summary

[Expand]
Inherited Constants
From class java.text.NumberFormat
Fields
public static final String[] DIRECTIONS The directions.
Public Constructors
CompassFormat()
Creates a new formatter.
Public Methods
StringBuffer format(double number, StringBuffer toAppendTo, FieldPosition pos)
Formats a number into the specified string buffer.
StringBuffer format(long number, StringBuffer toAppendTo, FieldPosition pos)
Formats a number into the specified string buffer.
String getDirectionCode(double direction)
Returns a string representing the direction.
Number parse(String source, ParsePosition parsePosition)
This method returns null for all inputs.
[Expand]
Inherited Methods
From class java.text.NumberFormat
From class java.text.Format
From class java.lang.Object

Fields

public static final String[] DIRECTIONS

The directions.

Public Constructors

public CompassFormat ()

Creates a new formatter.

Public Methods

public StringBuffer format (double number, StringBuffer toAppendTo, FieldPosition pos)

Formats a number into the specified string buffer.

Parameters
number the number to format.
toAppendTo the string buffer.
pos the field position (ignored here).
Returns
  • The string buffer.

public StringBuffer format (long number, StringBuffer toAppendTo, FieldPosition pos)

Formats a number into the specified string buffer.

Parameters
number the number to format.
toAppendTo the string buffer.
pos the field position (ignored here).
Returns
  • The string buffer.

public String getDirectionCode (double direction)

Returns a string representing the direction.

Parameters
direction the direction.
Returns
  • A string.

public Number parse (String source, ParsePosition parsePosition)

This method returns null for all inputs. This class cannot be used for parsing.

Parameters
source the source string.
parsePosition the parse position.
Returns
  • null.