Package de.gsi.chart
Class Chart
- java.lang.Object
-
- javafx.scene.Node
-
- javafx.scene.Parent
-
- javafx.scene.layout.Region
-
- javafx.scene.control.Control
-
- de.gsi.chart.ui.SidesPane
-
- de.gsi.chart.Chart
-
- All Implemented Interfaces:
javafx.beans.Observable,javafx.css.Styleable,javafx.event.EventTarget,javafx.scene.control.Skinnable
- Direct Known Subclasses:
XYChart
public abstract class Chart extends SidesPane implements javafx.beans.Observable
Chart designed primarily to display data traces using DataSet interfaces which are more flexible and efficient than the observable lists used by XYChart. Brief history: original design inspired by Oracle, extended by CERN (i.e. plugin concept/zoomer), modified to mitigate JavaFX performance issues and extended renderer concept/canvas-concept/interfaces/+more plugins by GSI. Refactored and re-write in 2018 to make it compatible with GPLv3 which -- in the spirit of 'Ship of Theseus' -- makes it de-facto a new development. Contributions, bug-fixes, and modifications are welcome. Hope you find this library useful and enjoy!- Author:
- original conceptual design by Oracle (2010, 2014), hbraeun, rstein, major refactoring, re-implementation and re-design
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classChart.ChartHBoxprotected classChart.ChartVBox
-
Field Summary
Fields Modifier and Type Field Description protected javafx.collections.ObservableList<de.gsi.dataset.DataSet>allDataSetsprotected ChartLayoutAnimatoranimatorAnimator for animating stuff on the chartprotected javafx.beans.property.BooleanPropertyautoNotificationprotected javafx.scene.layout.GridPaneaxesAndCanvasPaneprotected javafx.collections.ListChangeListener<Axis>axesChangeListenerprotected javafx.collections.ListChangeListener<Axis>axesChangeListenerLocalprotected java.util.Map<Corner,javafx.scene.layout.StackPane>axesCornerprotected javafx.collections.ObservableList<Axis>axesListprotected java.util.Map<Side,javafx.scene.layout.Pane>axesPaneprotected ResizableCanvascanvasprotected javafx.scene.layout.PanecanvasForegroundprotected javafx.collections.ListChangeListener<de.gsi.dataset.DataSet>datasetChangeListenerprotected de.gsi.dataset.event.EventListenerdataSetDataListenerprotected static booleanDEBUGprotected HiddenSidesPanehiddenPaneprotected booleanisAxesUpdateprotected booleanlayoutOngoingprotected java.util.List<javafx.beans.InvalidationListener>listenersprotected java.util.Map<Side,javafx.scene.layout.Pane>parameterDisplayPaneprotected javafx.scene.layout.PaneplotBackgroundprotected javafx.scene.layout.PaneplotForeGroundprotected javafx.scene.GrouppluginsAreaprotected javafx.collections.ListChangeListener<ChartPlugin>pluginsChangedprotected javafx.beans.binding.BooleanBindingshowingBindingprotected javafx.beans.property.BooleanPropertyshowingPropertyprotected javafx.beans.property.StringPropertytitleprotected javafx.scene.control.LabeltitleLabelprotected java.util.Map<Corner,javafx.scene.layout.StackPane>titleLegendCornerprotected java.util.Map<Side,javafx.scene.layout.Pane>titleLegendPaneprotected javafx.scene.layout.FlowPanetoolBar
-
Constructor Summary
Constructors Constructor Description Chart()Creates a new default Chart instance.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddListener(javafx.beans.InvalidationListener listener)protected voidanimate(javafx.animation.Animation animation)Play the given animation on every frame of the animation the chart will be relayed out until the animation finishes.javafx.beans.property.BooleanPropertyanimatedProperty()javafx.beans.property.BooleanPropertyautoNotificationProperty()protected abstract voidaxesChanged(javafx.collections.ListChangeListener.Change<? extends Axis> change)add Chart specific axis handling (ie.protected voidaxesChangedLocal(javafx.collections.ListChangeListener.Change<? extends Axis> change)add Chart specific axis handling (ie.protected voidaxesInvalidated(java.lang.Object axisObj)function called whenever a axis has been invalidated (e.g.protected static javafx.scene.GroupcreateChildGroup()protected voiddataSetInvalidated()protected voiddatasetsChanged(javafx.collections.ListChangeListener.Change<? extends de.gsi.dataset.DataSet> change)protected voidexecuteFireInvalidated()ChartfireInvalidated()Notifies listeners that the data has been invalidated.javafx.collections.ObservableList<de.gsi.dataset.DataSet>getAllDatasets()booleangetAnimated()Indicates whether data changes will be animated or not.javafx.collections.ObservableList<Axis>getAxes()javafx.scene.layout.GridPanegetAxesAndCanvasPane()javafx.scene.layout.StackPanegetAxesCornerPane(Corner corner)javafx.scene.layout.PanegetAxesPane(Side side)javafx.scene.canvas.CanvasgetCanvas()javafx.scene.layout.PanegetCanvasForeground()static java.util.List<javafx.css.CssMetaData<? extends javafx.css.Styleable,?>>getClassCssMetaData()protected java.util.List<javafx.css.CssMetaData<? extends javafx.css.Styleable,?>>getControlCssMetaData()javafx.collections.ObservableList<de.gsi.dataset.DataSet>getDatasets()AxisgetFirstAxis(javafx.geometry.Orientation orientation)LegendgetLegend()SidegetLegendSide()javafx.scene.layout.PanegetMeasurementBar(Side side)SidegetMeasurementBarSide()HiddenSidesPanegetPlotArea()javafx.scene.layout.PanegetPlotBackground()javafx.scene.layout.PanegetPlotForeground()javafx.collections.ObservableList<ChartPlugin>getPlugins()Returns a list of plugins added to this chart pane.javafx.collections.ObservableList<Renderer>getRenderers()java.lang.StringgetTitle()javafx.scene.layout.StackPanegetTitleLegendCornerPane(Corner corner)javafx.scene.layout.PanegetTitleLegendPane(Side side)SidegetTitleSide()javafx.scene.layout.FlowPanegetToolBar()SidegetToolBarSide()booleanisAutoNotification()booleanisLegendVisible()booleanisShowing()voidlayoutChildren()protected voidlayoutPluginsChildren()javafx.beans.property.ObjectProperty<Legend>legendProperty()javafx.beans.property.ObjectProperty<Side>legendSideProperty()javafx.beans.property.BooleanPropertylegendVisibleProperty()javafx.beans.property.ObjectProperty<Side>measurementBarSideProperty()protected voidpluginAdded(ChartPlugin plugin)protected voidpluginRemoved(ChartPlugin plugin)protected abstract voidredrawCanvas()(re-)draw canvas (if necessary).protected voidregisterShowingListener()booleanremoveFromAllAxesPanes(Axis node)voidremoveListener(javafx.beans.InvalidationListener listener)protected voidrendererChanged(javafx.collections.ListChangeListener.Change<? extends Renderer> change)voidrequestLayout()voidsetAnimated(boolean value)voidsetAutoNotifaction(boolean flag)voidsetLegend(Legend value)voidsetLegendSide(Side value)voidsetLegendVisible(boolean value)voidsetMeasurementBarSide(Side value)voidsetTitle(java.lang.String value)voidsetTitleSide(Side value)voidsetToolBarSide(Side value)protected booleanshouldAnimate()This is used to check if any given animation should run.javafx.beans.property.ReadOnlyBooleanPropertyshowingProperty()javafx.beans.property.StringPropertytitleProperty()javafx.beans.property.ObjectProperty<Side>titleSideProperty()javafx.beans.property.ObjectProperty<Side>toolBarSideProperty()javafx.geometry.Point2DtoPlotArea(double xCoord, double yCoord)Translates point from chart pane coordinates to the plot area coordinates.abstract voidupdateAxisRange()update axes ranges (if necessary).protected voidupdateLegend(java.util.List<de.gsi.dataset.DataSet> dataSets, java.util.List<Renderer> renderers)protected voidupdatePluginsArea()-
Methods inherited from class de.gsi.chart.ui.SidesPane
animationDelayProperty, animationDurationProperty, bottomProperty, contentProperty, createDefaultSkin, getAnimationDelay, getAnimationDuration, getBottom, getContent, getLeft, getRight, getTop, getTriggerDistance, isPinned, leftProperty, pinnedSideProperty, prefHeightBottomProperty, prefHeightTopProperty, prefWidthLeftProperty, prefWidthRightProperty, rightProperty, setAnimationDelay, setAnimationDuration, setBottom, setContent, setLeft, setPinned, setRight, setTop, setTriggerDistance, topProperty, triggerDistanceProperty
-
Methods inherited from class javafx.scene.control.Control
computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, executeAccessibleAction, getBaselineOffset, getContextMenu, getCssMetaData, getInitialFocusTraversable, getSkin, getTooltip, isResizable, queryAccessibleAttribute, setContextMenu, setSkin, setTooltip, skinProperty, tooltipProperty
-
Methods inherited from class javafx.scene.layout.Region
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, snapToPixelProperty, widthProperty
-
Methods inherited from class javafx.scene.Parent
getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, requestParentLayout, setNeedsLayout, updateBounds
-
Methods inherited from class javafx.scene.Node
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, getViewOrder, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visibleProperty
-
-
-
-
Field Detail
-
DEBUG
protected static final boolean DEBUG
- See Also:
- Constant Field Values
-
showingBinding
protected javafx.beans.binding.BooleanBinding showingBinding
-
showingProperty
protected final javafx.beans.property.BooleanProperty showingProperty
-
canvas
protected final ResizableCanvas canvas
-
axesAndCanvasPane
protected final javafx.scene.layout.GridPane axesAndCanvasPane
-
axesPane
protected final java.util.Map<Side,javafx.scene.layout.Pane> axesPane
-
titleLegendPane
protected final java.util.Map<Side,javafx.scene.layout.Pane> titleLegendPane
-
axesCorner
protected final java.util.Map<Corner,javafx.scene.layout.StackPane> axesCorner
-
titleLegendCorner
protected final java.util.Map<Corner,javafx.scene.layout.StackPane> titleLegendCorner
-
datasetChangeListener
protected final javafx.collections.ListChangeListener<de.gsi.dataset.DataSet> datasetChangeListener
-
allDataSets
protected final javafx.collections.ObservableList<de.gsi.dataset.DataSet> allDataSets
-
hiddenPane
protected final HiddenSidesPane hiddenPane
-
plotBackground
protected final javafx.scene.layout.Pane plotBackground
-
plotForeGround
protected final javafx.scene.layout.Pane plotForeGround
-
canvasForeground
protected final javafx.scene.layout.Pane canvasForeground
-
axesList
protected final javafx.collections.ObservableList<Axis> axesList
-
axesChangeListenerLocal
protected final javafx.collections.ListChangeListener<Axis> axesChangeListenerLocal
-
axesChangeListener
protected final javafx.collections.ListChangeListener<Axis> axesChangeListener
-
isAxesUpdate
protected boolean isAxesUpdate
-
animator
protected final ChartLayoutAnimator animator
Animator for animating stuff on the chart
-
titleLabel
protected final javafx.scene.control.Label titleLabel
-
title
protected final javafx.beans.property.StringProperty title
-
toolBar
protected final javafx.scene.layout.FlowPane toolBar
-
parameterDisplayPane
protected java.util.Map<Side,javafx.scene.layout.Pane> parameterDisplayPane
-
pluginsArea
protected final javafx.scene.Group pluginsArea
-
pluginsChanged
protected final javafx.collections.ListChangeListener<ChartPlugin> pluginsChanged
-
layoutOngoing
protected boolean layoutOngoing
-
dataSetDataListener
protected final de.gsi.dataset.event.EventListener dataSetDataListener
-
listeners
protected final java.util.List<javafx.beans.InvalidationListener> listeners
-
autoNotification
protected javafx.beans.property.BooleanProperty autoNotification
-
-
Method Detail
-
isShowing
public boolean isShowing()
- Returns:
- true: if chart is being visible in Scene/Window
-
showingProperty
public javafx.beans.property.ReadOnlyBooleanProperty showingProperty()
- Returns:
- property indicating if chart is actively visible in Scene/Window
-
getCanvas
public javafx.scene.canvas.Canvas getCanvas()
- Returns:
- the actual canvas the data is being drawn upon
-
getAxesAndCanvasPane
public javafx.scene.layout.GridPane getAxesAndCanvasPane()
-
getAxesPane
public javafx.scene.layout.Pane getAxesPane(Side side)
-
removeFromAllAxesPanes
public boolean removeFromAllAxesPanes(Axis node)
-
getTitleLegendPane
public javafx.scene.layout.Pane getTitleLegendPane(Side side)
-
getAxesCornerPane
public javafx.scene.layout.StackPane getAxesCornerPane(Corner corner)
-
getTitleLegendCornerPane
public javafx.scene.layout.StackPane getTitleLegendCornerPane(Corner corner)
-
getAllDatasets
public javafx.collections.ObservableList<de.gsi.dataset.DataSet> getAllDatasets()
- Returns:
- datasets attached to the chart and datasets attached to all renderers
-
getDatasets
public javafx.collections.ObservableList<de.gsi.dataset.DataSet> getDatasets()
- Returns:
- datasets attached to the chart and drawn by all renderers
-
getRenderers
public javafx.collections.ObservableList<Renderer> getRenderers()
- Returns:
- observable list of associated chart renderers
-
getPlotBackground
public javafx.scene.layout.Pane getPlotBackground()
-
getPlotForeground
public javafx.scene.layout.Pane getPlotForeground()
-
getCanvasForeground
public javafx.scene.layout.Pane getCanvasForeground()
-
getPlotArea
public HiddenSidesPane getPlotArea()
-
getAxes
public javafx.collections.ObservableList<Axis> getAxes()
-
axesChanged
protected abstract void axesChanged(javafx.collections.ListChangeListener.Change<? extends Axis> change)
add Chart specific axis handling (ie. placement around charts, add new DefaultNumericAxis if one is missing, etc.)- Parameters:
change- the new axis change that is being added
-
axesInvalidated
protected void axesInvalidated(java.lang.Object axisObj)
function called whenever a axis has been invalidated (e.g. range change or parameter plotting changes). Typically calls 'requestLayout()' but can be overwritten in derived classes.- Parameters:
axisObj- the calling axis object
-
axesChangedLocal
protected void axesChangedLocal(javafx.collections.ListChangeListener.Change<? extends Axis> change)
add Chart specific axis handling (ie. placement around charts, add new DefaultNumericAxis if one is missing, etc.)- Parameters:
change- the new axis change that is being added
-
getFirstAxis
public Axis getFirstAxis(javafx.geometry.Orientation orientation)
-
getTitle
public final java.lang.String getTitle()
-
setTitle
public final void setTitle(java.lang.String value)
-
titleProperty
public final javafx.beans.property.StringProperty titleProperty()
-
getTitleSide
public final Side getTitleSide()
-
setTitleSide
public final void setTitleSide(Side value)
-
titleSideProperty
public final javafx.beans.property.ObjectProperty<Side> titleSideProperty()
-
getMeasurementBarSide
public final Side getMeasurementBarSide()
-
setMeasurementBarSide
public final void setMeasurementBarSide(Side value)
-
measurementBarSideProperty
public final javafx.beans.property.ObjectProperty<Side> measurementBarSideProperty()
-
getLegend
public final Legend getLegend()
-
setLegend
public final void setLegend(Legend value)
-
legendProperty
public final javafx.beans.property.ObjectProperty<Legend> legendProperty()
-
isLegendVisible
public final boolean isLegendVisible()
-
setLegendVisible
public final void setLegendVisible(boolean value)
-
legendVisibleProperty
public final javafx.beans.property.BooleanProperty legendVisibleProperty()
-
getLegendSide
public final Side getLegendSide()
-
setLegendSide
public final void setLegendSide(Side value)
-
legendSideProperty
public final javafx.beans.property.ObjectProperty<Side> legendSideProperty()
-
getAnimated
public final boolean getAnimated()
Indicates whether data changes will be animated or not.- Returns:
- true if data changes will be animated and false otherwise.
-
setAnimated
public final void setAnimated(boolean value)
-
animatedProperty
public final javafx.beans.property.BooleanProperty animatedProperty()
-
getToolBar
public javafx.scene.layout.FlowPane getToolBar()
-
getMeasurementBar
public javafx.scene.layout.Pane getMeasurementBar(Side side)
-
getToolBarSide
public final Side getToolBarSide()
-
setToolBarSide
public final void setToolBarSide(Side value)
-
toolBarSideProperty
public final javafx.beans.property.ObjectProperty<Side> toolBarSideProperty()
-
getPlugins
public final javafx.collections.ObservableList<ChartPlugin> getPlugins()
Returns a list of plugins added to this chart pane.- Returns:
- a modifiable list of plugins
-
createChildGroup
protected static javafx.scene.Group createChildGroup()
-
pluginRemoved
protected void pluginRemoved(ChartPlugin plugin)
-
pluginAdded
protected void pluginAdded(ChartPlugin plugin)
-
updatePluginsArea
protected void updatePluginsArea()
-
registerShowingListener
protected void registerShowingListener()
-
updateAxisRange
public abstract void updateAxisRange()
update axes ranges (if necessary). This is supposed to be implemented in derived classes
-
redrawCanvas
protected abstract void redrawCanvas()
(re-)draw canvas (if necessary). This is supposed to be implemented in derived classes
-
layoutChildren
public void layoutChildren()
- Overrides:
layoutChildrenin classjavafx.scene.control.Control
-
layoutPluginsChildren
protected void layoutPluginsChildren()
-
dataSetInvalidated
protected void dataSetInvalidated()
-
datasetsChanged
protected void datasetsChanged(javafx.collections.ListChangeListener.Change<? extends de.gsi.dataset.DataSet> change)
-
updateLegend
protected void updateLegend(java.util.List<de.gsi.dataset.DataSet> dataSets, java.util.List<Renderer> renderers)
-
animate
protected void animate(javafx.animation.Animation animation)
Play the given animation on every frame of the animation the chart will be relayed out until the animation finishes. So to add a animation to a chart, create a animation on data model, during layoutChartContent() map data model to nodes then call this method with the animation.- Parameters:
animation- The animation to play
-
shouldAnimate
protected final boolean shouldAnimate()
This is used to check if any given animation should run. It returns true if animation is enabled and the node is visible and in a scene.- Returns:
- true if should animate
-
getClassCssMetaData
public static java.util.List<javafx.css.CssMetaData<? extends javafx.css.Styleable,?>> getClassCssMetaData()
- Returns:
- The CssMetaData associated with this class, which may include the CssMetaData of its super classes.
- Since:
- JavaFX 8.0
-
getControlCssMetaData
protected java.util.List<javafx.css.CssMetaData<? extends javafx.css.Styleable,?>> getControlCssMetaData()
- Overrides:
getControlCssMetaDatain classjavafx.scene.control.Control- Returns:
- unmodifiable list of the controls css styleable properties
- Since:
- JavaFX 8.0
-
addListener
public void addListener(javafx.beans.InvalidationListener listener)
- Specified by:
addListenerin interfacejavafx.beans.Observable
-
removeListener
public void removeListener(javafx.beans.InvalidationListener listener)
- Specified by:
removeListenerin interfacejavafx.beans.Observable
-
fireInvalidated
public Chart fireInvalidated()
Notifies listeners that the data has been invalidated. If the data is added to the chart, it triggers repaint.- Returns:
- itself (fluent design)
-
executeFireInvalidated
protected void executeFireInvalidated()
-
setAutoNotifaction
public void setAutoNotifaction(boolean flag)
-
isAutoNotification
public boolean isAutoNotification()
-
autoNotificationProperty
public javafx.beans.property.BooleanProperty autoNotificationProperty()
-
toPlotArea
public final javafx.geometry.Point2D toPlotArea(double xCoord, double yCoord)Translates point from chart pane coordinates to the plot area coordinates.- Parameters:
xCoord- the x coordinate within XYChartPane coordinates systemyCoord- the y coordinate within XYChartPane coordinates system- Returns:
- point in plot area coordinates
-
rendererChanged
protected void rendererChanged(javafx.collections.ListChangeListener.Change<? extends Renderer> change)
-
requestLayout
public void requestLayout()
- Overrides:
requestLayoutin classjavafx.scene.Parent
-
-