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

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


  34 import javafx.beans.property.DoubleProperty;
  35 import javafx.beans.property.ObjectProperty;
  36 import javafx.beans.property.ObjectPropertyBase;
  37 import javafx.beans.property.ReadOnlyDoubleProperty;
  38 import javafx.beans.property.ReadOnlyDoubleWrapper;
  39 import javafx.beans.property.SimpleDoubleProperty;
  40 import javafx.beans.value.WritableValue;
  41 import javafx.collections.FXCollections;
  42 import javafx.collections.ListChangeListener;
  43 import javafx.collections.ObservableList;
  44 import javafx.geometry.Dimension2D;
  45 import javafx.geometry.Side;
  46 import javafx.util.Duration;
  47 
  48 import com.sun.javafx.charts.ChartLayoutAnimator;
  49 
  50 import javafx.css.StyleableBooleanProperty;
  51 import javafx.css.StyleableDoubleProperty;
  52 import javafx.css.CssMetaData;
  53 
  54 import com.sun.javafx.css.converters.BooleanConverter;
  55 import com.sun.javafx.css.converters.SizeConverter;
  56 
  57 import java.util.Collections;
  58 
  59 import javafx.css.Styleable;
  60 import javafx.css.StyleableProperty;
  61 
  62 /**
  63  * A axis implementation that will works on string categories where each 
  64  * value as a unique category(tick mark) along the axis.
  65  * @since JavaFX 2.0
  66  */
  67 public final class CategoryAxis extends Axis<String> {
  68 
  69     // -------------- PRIVATE FIELDS -------------------------------------------
  70     private List<String> allDataCategories = new ArrayList<String>();
  71     private boolean changeIsLocal = false;
  72     /** This is the gap between one category and the next along this axis */
  73     private final DoubleProperty firstCategoryPos = new SimpleDoubleProperty(this, "firstCategoryPos", 0);
  74     private Object currentAnimationID;
  75     private final ChartLayoutAnimator animator = new ChartLayoutAnimator(this);




  34 import javafx.beans.property.DoubleProperty;
  35 import javafx.beans.property.ObjectProperty;
  36 import javafx.beans.property.ObjectPropertyBase;
  37 import javafx.beans.property.ReadOnlyDoubleProperty;
  38 import javafx.beans.property.ReadOnlyDoubleWrapper;
  39 import javafx.beans.property.SimpleDoubleProperty;
  40 import javafx.beans.value.WritableValue;
  41 import javafx.collections.FXCollections;
  42 import javafx.collections.ListChangeListener;
  43 import javafx.collections.ObservableList;
  44 import javafx.geometry.Dimension2D;
  45 import javafx.geometry.Side;
  46 import javafx.util.Duration;
  47 
  48 import com.sun.javafx.charts.ChartLayoutAnimator;
  49 
  50 import javafx.css.StyleableBooleanProperty;
  51 import javafx.css.StyleableDoubleProperty;
  52 import javafx.css.CssMetaData;
  53 
  54 import javafx.css.converter.BooleanConverter;
  55 import javafx.css.converter.SizeConverter;
  56 
  57 import java.util.Collections;
  58 
  59 import javafx.css.Styleable;
  60 import javafx.css.StyleableProperty;
  61 
  62 /**
  63  * A axis implementation that will works on string categories where each 
  64  * value as a unique category(tick mark) along the axis.
  65  * @since JavaFX 2.0
  66  */
  67 public final class CategoryAxis extends Axis<String> {
  68 
  69     // -------------- PRIVATE FIELDS -------------------------------------------
  70     private List<String> allDataCategories = new ArrayList<String>();
  71     private boolean changeIsLocal = false;
  72     /** This is the gap between one category and the next along this axis */
  73     private final DoubleProperty firstCategoryPos = new SimpleDoubleProperty(this, "firstCategoryPos", 0);
  74     private Object currentAnimationID;
  75     private final ChartLayoutAnimator animator = new ChartLayoutAnimator(this);