Spec-Zone.ru › OpenJavaFX 11
Module javafx.controls
Package javafx.scene.chart

Class NumberAxis.DefaultFormatter

  • java.lang.Object
    • javafx.util.StringConverter<Number>
      • javafx.scene.chart.NumberAxis.DefaultFormatter
  • Enclosing class:
    NumberAxis
    public static class NumberAxis.DefaultFormatter
    extends StringConverter<Number>
    Default number formatter for NumberAxis, this stays in sync with auto-ranging and formats values appropriately. You can wrap this formatter to add prefixes or suffixes;
    Since:
    JavaFX 2.0
  • Constructor Summary

    Constructors
    Constructor Description
    DefaultFormatter​(NumberAxis axis)
    Construct a DefaultFormatter for the given NumberAxis
    DefaultFormatter​(NumberAxis axis, String prefix, String suffix)
    Construct a DefaultFormatter for the given NumberAxis with a prefix and/or suffix.
  • Method Summary

    All MethodsInstance MethodsConcrete Methods
    Modifier and Type Method Description
    Number fromString​(String string)
    Converts the string provided into a Number defined by the this converter.
    String toString​(Number object)
    Converts the object provided into its string form.
    • Methods inherited from class java.lang.Object

      clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Detail

    • DefaultFormatter

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

      public DefaultFormatter​(NumberAxis axis,
                              String prefix,
                              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 String toString​(Number object)
      Converts the object provided into its string form. Format of the returned string is defined by this converter.
      Specified by:
      toString in class StringConverter<Number>
      Parameters:
      object - the object of type T to convert
      Returns:
      a string representation of the object passed in.
      See Also:
      StringConverter.toString(T)
    • fromString

      public Number fromString​(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 class StringConverter<Number>
      Parameters:
      string - the String to convert
      Returns:
      a Number representation of the string passed in.
      See Also:
      StringConverter.toString(T)

© 2008, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from JavaFX API Documentation.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Java, JavaFX and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API