Class SimpleFormatter

    • Constructor Detail

      • SimpleFormatter

        public SimpleFormatter​(Axis axis)
        Construct a DefaultFormatter for the given NumberAxis
        Parameters:
        axis - The axis to format tick marks for
      • SimpleFormatter

        public SimpleFormatter()
        Construct a DefaultFormatter for the given NumberAxis
      • SimpleFormatter

        public SimpleFormatter​(Axis axis,
                               java.lang.String prefix,
                               java.lang.String suffix)
        Construct a DefaultFormatter for the given NumberAxis with a prefix and/or suffix.
        Parameters:
        axis - The axis to format tick marks for
        prefix - The prefix to append to the start of formatted number, can be null if not needed
        suffix - The suffix to append to the end of formatted number, can be null if not needed
    • Method Detail

      • toString

        public java.lang.String toString​(java.lang.Number object)
        Converts the object provided into its string form. Format of the returned string is defined by this converter.
        Specified by:
        toString in interface AxisLabelFormatter
        Specified by:
        toString in class javafx.util.StringConverter<java.lang.Number>
        Parameters:
        object - the number to be converted
        Returns:
        a string representation of the object passed in.
        See Also:
        StringConverter.toString(T)
      • fromString

        public java.lang.Number fromString​(java.lang.String string)
        Converts the string provided into a Number defined by the this converter. Format of the string and type of the resulting object is defined by this converter.
        Specified by:
        fromString in interface AxisLabelFormatter
        Specified by:
        fromString in class javafx.util.StringConverter<java.lang.Number>
        Parameters:
        string - the string to be converted back into a number
        Returns:
        a Number representation of the string passed in.
        See Also:
        StringConverter.toString(T)