< prev index next >

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

Print this page

        

*** 170,184 **** }; // -------------- PUBLIC PROPERTIES -------------------------------------------------------------------------------- private final Axis<X> xAxis; ! /** Get the X axis, by default it is along the bottom of the plot */ public Axis<X> getXAxis() { return xAxis; } private final Axis<Y> yAxis; ! /** Get the Y axis, by default it is along the left of the plot */ public Axis<Y> getYAxis() { return yAxis; } /** XYCharts data */ private ObjectProperty<ObservableList<Series<X,Y>>> data = new ObjectPropertyBase<ObservableList<Series<X,Y>>>() { private ObservableList<Series<X,Y>> old; --- 170,190 ---- }; // -------------- PUBLIC PROPERTIES -------------------------------------------------------------------------------- private final Axis<X> xAxis; ! /** ! * Get the X axis, by default it is along the bottom of the plot ! * @return the X axis of the chart ! */ public Axis<X> getXAxis() { return xAxis; } private final Axis<Y> yAxis; ! /** ! * Get the Y axis, by default it is along the left of the plot ! * @return the Y axis of this chart ! */ public Axis<Y> getYAxis() { return yAxis; } /** XYCharts data */ private ObjectProperty<ObservableList<Series<X,Y>>> data = new ObjectPropertyBase<ObservableList<Series<X,Y>>>() { private ObservableList<Series<X,Y>> old;
*** 610,620 **** * * @param series The series that has been removed */ protected abstract void seriesRemoved(Series<X,Y> series); ! /** Called when each atomic change is made to the list of series for this chart */ protected void seriesChanged(Change<? extends Series> c) {} /** * This is called when a data change has happened that may cause the range to be invalid. */ --- 616,629 ---- * * @param series The series that has been removed */ protected abstract void seriesRemoved(Series<X,Y> series); ! /** ! * Called when each atomic change is made to the list of series for this chart ! * @param c The series that has been changed ! */ protected void seriesChanged(Change<? extends Series> c) {} /** * This is called when a data change has happened that may cause the range to be invalid. */
*** 651,661 **** * the plot on top of the axis and grid lines etc. The origin is the top left of the plot area, the plot area with * can be got by getting the width of the x axis and its height from the height of the y axis. */ protected abstract void layoutPlotChildren(); ! /** @inheritDoc */ @Override protected final void layoutChartChildren(double top, double left, double width, double height) { if(getData() == null) return; if (!rangeValid) { rangeValid = true; if(getData() != null) updateAxisRange(); --- 660,670 ---- * the plot on top of the axis and grid lines etc. The origin is the top left of the plot area, the plot area with * can be got by getting the width of the x axis and its height from the height of the y axis. */ protected abstract void layoutPlotChildren(); ! /** {@inheritDoc} */ @Override protected final void layoutChartChildren(double top, double left, double width, double height) { if(getData() == null) return; if (!rangeValid) { rangeValid = true; if(getData() != null) updateAxisRange();
*** 961,976 **** --- 970,988 ---- /** * The current displayed data value plotted on the X axis. This may be the same as xValue or different. It is * used by XYChart to animate the xValue from the old value to the new value. This is what you should plot * in any custom XYChart implementations. Some XYChart chart implementations such as LineChart also use this * to animate when data is added or removed. + * @param item The XYChart.Data item from which the current X axis data value is obtained + * @return The current displayed X data value */ protected final X getCurrentDisplayedXValue(Data<X,Y> item) { return item.getCurrentX(); } /** Set the current displayed data value plotted on X axis. * * @param item The XYChart.Data item from which the current X axis data value is obtained. + * @param value The X axis data value * @see #getCurrentDisplayedXValue */ protected final void setCurrentDisplayedXValue(Data<X,Y> item, X value) { item.setCurrentX(value); } /** The current displayed data value property that is plotted on X axis.
*** 984,1000 **** --- 996,1015 ---- /** * The current displayed data value plotted on the Y axis. This may be the same as yValue or different. It is * used by XYChart to animate the yValue from the old value to the new value. This is what you should plot * in any custom XYChart implementations. Some XYChart chart implementations such as LineChart also use this * to animate when data is added or removed. + * @param item The XYChart.Data item from which the current Y axis data value is obtained + * @return The current displayed Y data value */ protected final Y getCurrentDisplayedYValue(Data<X,Y> item) { return item.getCurrentY(); } /** * Set the current displayed data value plotted on Y axis. * * @param item The XYChart.Data item from which the current Y axis data value is obtained. + * @param value The Y axis data value * @see #getCurrentDisplayedYValue */ protected final void setCurrentDisplayedYValue(Data<X,Y> item, Y value) { item.setCurrentY(value); } /** The current displayed data value property that is plotted on Y axis.
*** 1007,1032 **** /** * The current displayed data extra value. This may be the same as extraValue or different. It is * used by XYChart to animate the extraValue from the old value to the new value. This is what you should plot * in any custom XYChart implementations. */ protected final Object getCurrentDisplayedExtraValue(Data<X,Y> item) { return item.getCurrentExtraValue(); } /** * Set the current displayed data extra value. * * @param item The XYChart.Data item from which the current extra value is obtained. * @see #getCurrentDisplayedExtraValue */ protected final void setCurrentDisplayedExtraValue(Data<X,Y> item, Object value) { item.setCurrentExtraValue(value); } /** * The current displayed extra value property. * * @param item The XYChart.Data item from which the current extra value property object is obtained. ! * @return ObjectProperty<Object> The current extra value ObjectProperty * @see #getCurrentDisplayedExtraValue */ protected final ObjectProperty<Object> currentDisplayedExtraValueProperty(Data<X,Y> item) { return item.currentExtraValueProperty(); } /** --- 1022,1050 ---- /** * The current displayed data extra value. This may be the same as extraValue or different. It is * used by XYChart to animate the extraValue from the old value to the new value. This is what you should plot * in any custom XYChart implementations. + * @param item The XYChart.Data item from which the current extra value is obtained + * @return The current extra value */ protected final Object getCurrentDisplayedExtraValue(Data<X,Y> item) { return item.getCurrentExtraValue(); } /** * Set the current displayed data extra value. * * @param item The XYChart.Data item from which the current extra value is obtained. + * @param value The extra value * @see #getCurrentDisplayedExtraValue */ protected final void setCurrentDisplayedExtraValue(Data<X,Y> item, Object value) { item.setCurrentExtraValue(value); } /** * The current displayed extra value property. * * @param item The XYChart.Data item from which the current extra value property object is obtained. ! * @return {@literal ObjectProperty<Object> The current extra value ObjectProperty} * @see #getCurrentDisplayedExtraValue */ protected final ObjectProperty<Object> currentDisplayedExtraValueProperty(Data<X,Y> item) { return item.currentExtraValueProperty(); } /**
< prev index next >