Class ChartPlugin

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected ChartPlugin()
      Creates a new instance of the ChartPlugin.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javafx.beans.property.BooleanProperty addButtonsToToolBarProperty()
      When true the corresponding control buttons are added to the chart tool bar
      javafx.beans.property.ObjectProperty<Chart> chartProperty()
      The associated Chart.
      Chart getChart()
      Returns the value of the chartProperty().
      javafx.collections.ObservableList<javafx.scene.Node> getChartChildren()
      Returns a list containing nodes that should be added to the list of child nodes of the associated XYChart's plot area children.
      protected javafx.geometry.Point2D getLocationInPlotArea​(javafx.scene.input.MouseEvent event)
      Converts mouse location within the scene to the location relative to the plot area.
      boolean isAddButtonsToToolBar()
      Returns the value of the addButtonsToToolBarProperty().
      void layoutChildren()
      Optional method that allows the plug-in to react in case the size of the chart that it belongs to has changed.
      protected void registerInputEventHandler​(javafx.event.EventType<? extends javafx.scene.input.InputEvent> eventType, javafx.event.EventHandler<? extends javafx.scene.input.InputEvent> handler)
      Registers event handlers that should be added to the XYChartPane node when the plugin is added to the pane and are removed once the plugin is removed from the pane.
      void setAddButtonsToToolBar​(boolean state)
      Sets the value of the addButtonsToToolBarProperty().
      void setChart​(Chart chart)
      Called by the Chart when the plugin is added to it.
      protected de.gsi.dataset.spi.utils.Tuple<java.lang.Number,​java.lang.Number> toDataPoint​(Axis yAxis, javafx.geometry.Point2D displayPoint)
      Converts given display point within the plot area coordinates to the corresponding data point within data coordinates.
      protected javafx.geometry.Point2D toDisplayPoint​(Axis yAxis, double x, double y)
      Converts given point in data coordinates to a point in display coordinates.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ChartPlugin

        protected ChartPlugin()
        Creates a new instance of the ChartPlugin.
    • Method Detail

      • addButtonsToToolBarProperty

        public final javafx.beans.property.BooleanProperty addButtonsToToolBarProperty()
        When true the corresponding control buttons are added to the chart tool bar
        Returns:
        the sliderVisible property
      • chartProperty

        public final javafx.beans.property.ObjectProperty<Chart> chartProperty()
        The associated Chart. Initialised when the plug-in is added to the Chart, set to null when removed.
        Returns:
        the chart property
      • getChart

        public final Chart getChart()
        Returns the value of the chartProperty().
        Returns:
        the associated Chart or null
      • getChartChildren

        public final javafx.collections.ObservableList<javafx.scene.Node> getChartChildren()
        Returns a list containing nodes that should be added to the list of child nodes of the associated XYChart's plot area children.

        The method should be used by concrete implementations to add nodes that should be added to the chart area.

        Returns:
        non-null list of nodes to be added to the chart's plot area
      • getLocationInPlotArea

        protected final javafx.geometry.Point2D getLocationInPlotArea​(javafx.scene.input.MouseEvent event)
        Converts mouse location within the scene to the location relative to the plot area.
        Parameters:
        event - mouse event
        Returns:
        location within the plot area
      • isAddButtonsToToolBar

        public final boolean isAddButtonsToToolBar()
        Returns the value of the addButtonsToToolBarProperty().
        Returns:
        true the corresponding control buttons are added to the chart tool bar
      • layoutChildren

        public void layoutChildren()
        Optional method that allows the plug-in to react in case the size of the chart that it belongs to has changed.
      • registerInputEventHandler

        protected final void registerInputEventHandler​(javafx.event.EventType<? extends javafx.scene.input.InputEvent> eventType,
                                                       javafx.event.EventHandler<? extends javafx.scene.input.InputEvent> handler)
        Registers event handlers that should be added to the XYChartPane node when the plugin is added to the pane and are removed once the plugin is removed from the pane.
        Parameters:
        eventType - the event type on which the handler should be called
        handler - the event handler to be added to the chart
      • setAddButtonsToToolBar

        public final void setAddButtonsToToolBar​(boolean state)
        Sets the value of the addButtonsToToolBarProperty().
        Parameters:
        state - if true the corresponding control buttons are added to the chart tool bar
      • setChart

        public final void setChart​(Chart chart)
        Called by the Chart when the plugin is added to it.
        Parameters:
        chart - the chart pane
      • toDataPoint

        protected final de.gsi.dataset.spi.utils.Tuple<java.lang.Number,​java.lang.Number> toDataPoint​(Axis yAxis,
                                                                                                            javafx.geometry.Point2D displayPoint)
        Converts given display point within the plot area coordinates to the corresponding data point within data coordinates.
        Parameters:
        yAxis - the number-based y axis
        displayPoint - the display point to be converted
        Returns:
        the data point
      • toDisplayPoint

        protected final javafx.geometry.Point2D toDisplayPoint​(Axis yAxis,
                                                               double x,
                                                               double y)
        Converts given point in data coordinates to a point in display coordinates.
        Parameters:
        yAxis - the corresponding y-axis (number axis)
        x - the X coordinate (can be generic non-number, ie. CategoryAxis)
        y - the Y coordinate on the yAxis (Number based)
        Returns:
        corresponding display point within the plot area