39 import javafx.beans.property.ObjectPropertyBase;
40 import javafx.beans.property.SimpleBooleanProperty;
41 import javafx.beans.property.StringProperty;
42 import javafx.beans.property.StringPropertyBase;
43 import javafx.beans.value.WritableValue;
44 import javafx.collections.ObservableList;
45 import javafx.geometry.Pos;
46 import javafx.geometry.Side;
47 import javafx.scene.Node;
48 import javafx.scene.control.Label;
49 import javafx.scene.layout.Pane;
50 import javafx.scene.layout.Region;
51
52 import com.sun.javafx.charts.ChartLayoutAnimator;
53 import com.sun.javafx.charts.Legend;
54
55 import javafx.css.StyleableBooleanProperty;
56 import javafx.css.StyleableObjectProperty;
57 import javafx.css.CssMetaData;
58
59 import com.sun.javafx.css.converters.BooleanConverter;
60 import com.sun.javafx.css.converters.EnumConverter;
61
62 import javafx.css.Styleable;
63 import javafx.css.StyleableProperty;
64
65 /**
66 * Base class for all charts. It has 3 parts the title, legend and chartContent. The chart content is populated by the
67 * specific subclass of Chart.
68 *
69 * @since JavaFX 2.0
70 */
71 public abstract class Chart extends Region {
72
73 // -------------- PRIVATE FIELDS -----------------------------------------------------------------------------------
74
75 private static final int MIN_WIDTH_TO_LEAVE_FOR_CHART_CONTENT = 200;
76 private static final int MIN_HEIGHT_TO_LEAVE_FOR_CHART_CONTENT = 150;
77
78 /** Title Label */
79 private final Label titleLabel = new Label();
80 /**
|
39 import javafx.beans.property.ObjectPropertyBase;
40 import javafx.beans.property.SimpleBooleanProperty;
41 import javafx.beans.property.StringProperty;
42 import javafx.beans.property.StringPropertyBase;
43 import javafx.beans.value.WritableValue;
44 import javafx.collections.ObservableList;
45 import javafx.geometry.Pos;
46 import javafx.geometry.Side;
47 import javafx.scene.Node;
48 import javafx.scene.control.Label;
49 import javafx.scene.layout.Pane;
50 import javafx.scene.layout.Region;
51
52 import com.sun.javafx.charts.ChartLayoutAnimator;
53 import com.sun.javafx.charts.Legend;
54
55 import javafx.css.StyleableBooleanProperty;
56 import javafx.css.StyleableObjectProperty;
57 import javafx.css.CssMetaData;
58
59 import javafx.css.converter.BooleanConverter;
60 import javafx.css.converter.EnumConverter;
61
62 import javafx.css.Styleable;
63 import javafx.css.StyleableProperty;
64
65 /**
66 * Base class for all charts. It has 3 parts the title, legend and chartContent. The chart content is populated by the
67 * specific subclass of Chart.
68 *
69 * @since JavaFX 2.0
70 */
71 public abstract class Chart extends Region {
72
73 // -------------- PRIVATE FIELDS -----------------------------------------------------------------------------------
74
75 private static final int MIN_WIDTH_TO_LEAVE_FOR_CHART_CONTENT = 200;
76 private static final int MIN_HEIGHT_TO_LEAVE_FOR_CHART_CONTENT = 150;
77
78 /** Title Label */
79 private final Label titleLabel = new Label();
80 /**
|