modules/controls/src/main/java/javafx/scene/chart/NumberAxis.java

Print this page
rev 9240 : 8076423: JEP 253: Prepare JavaFX UI Controls & CSS APIs for Modularization


  33 
  34 import javafx.animation.KeyFrame;
  35 import javafx.animation.KeyValue;
  36 import javafx.beans.property.BooleanProperty;
  37 import javafx.beans.property.BooleanPropertyBase;
  38 import javafx.beans.property.DoubleProperty;
  39 import javafx.beans.property.SimpleStringProperty;
  40 import javafx.beans.property.StringProperty;
  41 import javafx.beans.value.ChangeListener;
  42 import javafx.beans.value.WritableValue;
  43 import javafx.geometry.Dimension2D;
  44 import javafx.geometry.Side;
  45 import javafx.util.Duration;
  46 import javafx.util.StringConverter;
  47 
  48 import com.sun.javafx.charts.ChartLayoutAnimator;
  49 
  50 import javafx.css.StyleableDoubleProperty;
  51 import javafx.css.CssMetaData;
  52 
  53 import com.sun.javafx.css.converters.SizeConverter;
  54 
  55 import javafx.css.Styleable;
  56 import javafx.css.StyleableProperty;
  57 
  58 /**
  59  * A axis class that plots a range of numbers with major tick marks every "tickUnit". You can use any Number type with
  60  * this axis, Long, Double, BigDecimal etc.
  61  * @since JavaFX 2.0
  62  */
  63 public final class NumberAxis extends ValueAxis<Number> {
  64 
  65     private Object currentAnimationID;
  66     private final ChartLayoutAnimator animator = new ChartLayoutAnimator(this);
  67     private final StringProperty currentFormatterProperty = new SimpleStringProperty(this, "currentFormatter", "");
  68     private final DefaultFormatter defaultFormatter = new DefaultFormatter(this);
  69 
  70     // -------------- PUBLIC PROPERTIES --------------------------------------------------------------------------------
  71 
  72     /** When true zero is always included in the visible range. This only has effect if auto-ranging is on. */
  73     private BooleanProperty forceZeroInRange = new BooleanPropertyBase(true) {




  33 
  34 import javafx.animation.KeyFrame;
  35 import javafx.animation.KeyValue;
  36 import javafx.beans.property.BooleanProperty;
  37 import javafx.beans.property.BooleanPropertyBase;
  38 import javafx.beans.property.DoubleProperty;
  39 import javafx.beans.property.SimpleStringProperty;
  40 import javafx.beans.property.StringProperty;
  41 import javafx.beans.value.ChangeListener;
  42 import javafx.beans.value.WritableValue;
  43 import javafx.geometry.Dimension2D;
  44 import javafx.geometry.Side;
  45 import javafx.util.Duration;
  46 import javafx.util.StringConverter;
  47 
  48 import com.sun.javafx.charts.ChartLayoutAnimator;
  49 
  50 import javafx.css.StyleableDoubleProperty;
  51 import javafx.css.CssMetaData;
  52 
  53 import javafx.css.converter.SizeConverter;
  54 
  55 import javafx.css.Styleable;
  56 import javafx.css.StyleableProperty;
  57 
  58 /**
  59  * A axis class that plots a range of numbers with major tick marks every "tickUnit". You can use any Number type with
  60  * this axis, Long, Double, BigDecimal etc.
  61  * @since JavaFX 2.0
  62  */
  63 public final class NumberAxis extends ValueAxis<Number> {
  64 
  65     private Object currentAnimationID;
  66     private final ChartLayoutAnimator animator = new ChartLayoutAnimator(this);
  67     private final StringProperty currentFormatterProperty = new SimpleStringProperty(this, "currentFormatter", "");
  68     private final DefaultFormatter defaultFormatter = new DefaultFormatter(this);
  69 
  70     // -------------- PUBLIC PROPERTIES --------------------------------------------------------------------------------
  71 
  72     /** When true zero is always included in the visible range. This only has effect if auto-ranging is on. */
  73     private BooleanProperty forceZeroInRange = new BooleanPropertyBase(true) {