Documentation of 'org.jfree.chart.axis.CompassFormat' Java class
CompassFormat
org.jfree.chart.axis

Class CompassFormat

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable


    public class CompassFormat
    extends java.text.NumberFormat
    A formatter that displays numbers as directions.
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.text.NumberFormat

        java.text.NumberFormat.Field
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      java.lang.String[] directions
      The directions.
      • Fields inherited from class java.text.NumberFormat

        FRACTION_FIELD, INTEGER_FIELD
    • Constructor Summary

      Constructors 
      Constructor and Description
      CompassFormat()
      Creates a new formatter using English identifiers.
      CompassFormat(java.lang.String[] directions)
      Creates a new formatter using the specified identifiers.
      CompassFormat(java.lang.String n, java.lang.String e, java.lang.String s, java.lang.String w)
      Creates a new formatter using the specified identifiers for the base wind directions.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.StringBuffer format(double number, java.lang.StringBuffer toAppendTo, java.text.FieldPosition pos)
      Formats a number into the specified string buffer.
      java.lang.StringBuffer format(long number, java.lang.StringBuffer toAppendTo, java.text.FieldPosition pos)
      Formats a number into the specified string buffer.
      java.lang.String getDirectionCode(double direction)
      Returns a string representing the direction.
      java.lang.Number parse(java.lang.String source, java.text.ParsePosition parsePosition)
      This method returns null for all inputs.
      • Methods inherited from class java.text.NumberFormat

        clone, equals, format, format, format, getAvailableLocales, 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
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • directions

        public final java.lang.String[] directions
        The directions.
    • Constructor Detail

      • CompassFormat

        public CompassFormat()
        Creates a new formatter using English identifiers.
      • CompassFormat

        public CompassFormat(java.lang.String n,
                             java.lang.String e,
                             java.lang.String s,
                             java.lang.String w)
        Creates a new formatter using the specified identifiers for the base wind directions.
        Parameters:
        n - the code for NORTH.
        e - the code for EAST.
        s - the code for SOUTH.
        w - the code for WEST.
        Since:
        1.0.18
      • CompassFormat

        public CompassFormat(java.lang.String[] directions)
        Creates a new formatter using the specified identifiers.
        Parameters:
        directions - an array containing 16 strings representing the directions of a compass.
        Since:
        1.0.18
    • Method Detail

      • getDirectionCode

        public java.lang.String getDirectionCode(double direction)
        Returns a string representing the direction.
        Parameters:
        direction - the direction.
        Returns:
        A string.
      • format

        public java.lang.StringBuffer format(double number,
                                             java.lang.StringBuffer toAppendTo,
                                             java.text.FieldPosition pos)
        Formats a number into the specified string buffer.
        Specified by:
        format in class java.text.NumberFormat
        Parameters:
        number - the number to format.
        toAppendTo - the string buffer.
        pos - the field position (ignored here).
        Returns:
        The string buffer.
      • format

        public java.lang.StringBuffer format(long number,
                                             java.lang.StringBuffer toAppendTo,
                                             java.text.FieldPosition pos)
        Formats a number into the specified string buffer.
        Specified by:
        format in class java.text.NumberFormat
        Parameters:
        number - the number to format.
        toAppendTo - the string buffer.
        pos - the field position (ignored here).
        Returns:
        The string buffer.
      • parse

        public java.lang.Number parse(java.lang.String source,
                                      java.text.ParsePosition parsePosition)
        This method returns null for all inputs. This class cannot be used for parsing.
        Specified by:
        parse in class java.text.NumberFormat
        Parameters:
        source - the source string.
        parsePosition - the parse position.
        Returns:
        null.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.