Interface Axis

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      javafx.beans.property.BooleanProperty autoGrowRangingProperty()
      This is true when the axis determines its range from the data automatically
      javafx.beans.property.BooleanProperty autoRangingProperty()
      This is true when the axis determines its range from the data automatically
      javafx.beans.property.BooleanProperty autoUnitScalingProperty()  
      void drawAxis​(javafx.scene.canvas.GraphicsContext gc, double axisWidth, double axisHeight)
      Function allows custom drawing of axes outside the Axis environment (ie.
      void forceRedraw()
      forces redrawing of axis (via layoutChildren()).
      AxisRange getAutoRange()
      if available (last) auto-range that has been computed
      AxisTransform getAxisTransform()  
      double getDisplayPosition​(double value)
      Get the display position along this axis for a given value.
      double getHeight()  
      double getLength()  
      LogAxisType getLogAxisType()  
      int getMinorTickCount()  
      javafx.collections.ObservableList<TickMark> getMinorTickMarks()  
      AxisRange getRange()
      on auto-ranging this returns getAutoRange(), otherwise the user-specified range getUserRange() (ie.
      Side getSide()  
      javafx.scene.paint.Paint getTickLabelFill()  
      javafx.scene.text.Font getTickLabelFont()  
      javafx.util.StringConverter<java.lang.Number> getTickLabelFormatter()  
      double getTickLabelGap()  
      java.lang.String getTickMarkLabel​(double value)
      Get the string label name for a tick mark with the given value
      javafx.collections.ObservableList<TickMark> getTickMarks()  
      double getTickUnit()  
      double getUnitScaling()  
      AxisRange getUserRange()
      user-specified range (ie.
      double getValueForDisplay​(double displayPosition)
      Get the data value for the given display position on this axis.
      double getWidth()  
      double getZeroPosition()
      Get the display position of the zero line along this axis.
      void invalidateRange​(java.util.List<java.lang.Number> data)
      Called when data has changed and the range may not be valid any more.
      void invertAxis​(boolean value)
      This is true when the axis labels and data point order should be inverted
      javafx.beans.property.BooleanProperty invertAxisProperty()
      This is true when the axis labels and data point order should be inverted
      default void invokeListener​(de.gsi.dataset.event.UpdateEvent updateEvent, boolean executeParallel)
      invoke object within update listener list
      boolean isAutoGrowRanging()
      This is true when the axis determines its range from the data automatically and grows it if necessary
      boolean isAutoRanging()
      This is true when the axis determines its range from the data automatically
      boolean isAutoUnitScaling()  
      boolean isInvertedAxis()
      This is true when the axis labels and data point order should be inverted
      boolean isLogAxis()
      This is true when the axis implements a log scale
      boolean isTimeAxis()
      This is true when the axis corresponds to a time axis
      boolean isValueOnAxis​(double value)
      Checks if the given value is plottable on this axis
      javafx.beans.property.DoubleProperty maxProperty()  
      javafx.beans.property.DoubleProperty minProperty()  
      javafx.beans.property.StringProperty nameProperty()  
      void requestAxisLayout()
      Request that the axis is laid out in the next layout pass.
      void setAnimated​(boolean value)  
      void setAutoGrowRanging​(boolean value)
      This is true when the axis determines its range from the data automatically and grows it if necessary
      void setAutoRanging​(boolean value)
      This is true when the axis determines its range from the data automatically
      void setAutoUnitScaling​(boolean value)  
      void setName​(java.lang.String value)  
      void setSide​(Side newSide)  
      void setTickUnit​(double tickUnit)  
      void setTimeAxis​(boolean value)
      This is true when the axis labels and data point should be plotted according to some time-axis definition
      void setUnit​(java.lang.String value)  
      void setUnitScaling​(double value)  
      void setUnitScaling​(MetricPrefix value)  
      javafx.beans.property.ObjectProperty<Side> sideProperty()  
      javafx.beans.property.DoubleProperty tickUnitProperty()  
      javafx.beans.property.BooleanProperty timeAxisProperty()
      This is true when the axis labels and data point should be plotted according to some time-axis definition
      javafx.beans.property.ObjectProperty<java.lang.String> unitProperty()  
      javafx.beans.property.DoubleProperty unitScalingProperty()  
      • Methods inherited from interface de.gsi.dataset.AxisDescription

        add, add, add, clear, contains, getMax, getMin, getName, getUnit, isDefined, set, set, set, set, setMax, setMin
      • Methods inherited from interface de.gsi.dataset.event.EventSource

        addListener, autoNotification, invokeListener, invokeListener, isAutoNotification, removeListener, updateEventListener
    • Method Detail

      • autoGrowRangingProperty

        javafx.beans.property.BooleanProperty autoGrowRangingProperty()
        This is true when the axis determines its range from the data automatically
        Returns:
        property
      • autoRangingProperty

        javafx.beans.property.BooleanProperty autoRangingProperty()
        This is true when the axis determines its range from the data automatically
        Returns:
        property
      • autoUnitScalingProperty

        javafx.beans.property.BooleanProperty autoUnitScalingProperty()
        Returns:
        true -> scale to the nearest SI unit prefix
      • drawAxis

        void drawAxis​(javafx.scene.canvas.GraphicsContext gc,
                      double axisWidth,
                      double axisHeight)
        Function allows custom drawing of axes outside the Axis environment (ie. on another canvas)
        Parameters:
        gc - the graphic context on which the axis is to be drawn
        axisWidth - the axis width in pixel (N.B. padding is being added)
        axisHeight - the axis height in pixel (N.B. padding is being added)
      • forceRedraw

        void forceRedraw()
        forces redrawing of axis (via layoutChildren()). This is used to force an update while the main chart area is being updated (a requestLayout()) would be executed only during the next pulse. This is used explicitly in the Chart class. Outside use of this context should be limited to a minimum... handle with care
      • getAutoRange

        AxisRange getAutoRange()
        if available (last) auto-range that has been computed
        Returns:
        computed auto-range
      • getDisplayPosition

        double getDisplayPosition​(double value)
        Get the display position along this axis for a given value. If the value is not in the current range, the returned value will be an extrapolation of the display position. If the value is not valid for this Axis and the axis cannot display such value in any range, Double.NaN is returned
        Parameters:
        value - The data value to work out display position for
        Returns:
        display position or Double.NaN if value not valid
      • getHeight

        double getHeight()
      • getLength

        double getLength()
        Specified by:
        getLength in interface de.gsi.dataset.AxisDescription
        Returns:
        axis length in pixel
      • getLogAxisType

        LogAxisType getLogAxisType()
        Returns:
        given linear and/or logarithmic (+ sub-type, e.g. log10, dB20, ...) axis types
      • getMinorTickCount

        int getMinorTickCount()
      • getMinorTickMarks

        javafx.collections.ObservableList<TickMark> getMinorTickMarks()
      • getRange

        AxisRange getRange()
        on auto-ranging this returns getAutoRange(), otherwise the user-specified range getUserRange() (ie. limits based on [lower,upper]Bound)
        Returns:
        actual range that is being used.
      • getSide

        Side getSide()
        Returns:
        the layout side
      • getTickLabelFill

        javafx.scene.paint.Paint getTickLabelFill()
        Returns:
        the fill for all tick labels
      • getTickLabelFont

        javafx.scene.text.Font getTickLabelFont()
        Returns:
        the font for all tick labels
      • getTickLabelFormatter

        javafx.util.StringConverter<java.lang.Number> getTickLabelFormatter()
      • getTickLabelGap

        double getTickLabelGap()
        Returns:
        the gap between tick labels and the tick mark lines
      • getTickMarkLabel

        java.lang.String getTickMarkLabel​(double value)
        Get the string label name for a tick mark with the given value
        Parameters:
        value - The value to format into a tick label string
        Returns:
        A formatted string for the given value
      • getTickMarks

        javafx.collections.ObservableList<TickMark> getTickMarks()
      • getTickUnit

        double getTickUnit()
      • getUnitScaling

        double getUnitScaling()
        Returns:
        axis primary unit scaling
      • getUserRange

        AxisRange getUserRange()
        user-specified range (ie. limits based on [lower,upper]Bound)
        Returns:
        user-specified range
      • getValueForDisplay

        double getValueForDisplay​(double displayPosition)
        Get the data value for the given display position on this axis. If the axis is a CategoryAxis this will be the nearest value.
        Parameters:
        displayPosition - A pixel position on this axis
        Returns:
        the nearest data value to the given pixel position or null if not on axis;
      • getWidth

        double getWidth()
      • getZeroPosition

        double getZeroPosition()
        Get the display position of the zero line along this axis.
        Returns:
        display position or Double.NaN if zero is not in current range;
      • invalidateRange

        void invalidateRange​(java.util.List<java.lang.Number> data)
        Called when data has changed and the range may not be valid any more. This is only called by the chart if isAutoRanging() returns true. If we are auto ranging it will cause layout to be requested and auto ranging to happen on next layout pass.
        Parameters:
        data - The current set of all data that needs to be plotted on this axis
      • invertAxis

        void invertAxis​(boolean value)
        This is true when the axis labels and data point order should be inverted
        Parameters:
        value - true if axis shall be inverted (i.e. drawn from 'max->min', rather than the normal 'min->max')
      • invertAxisProperty

        javafx.beans.property.BooleanProperty invertAxisProperty()
        This is true when the axis labels and data point order should be inverted
        Returns:
        property
      • invokeListener

        default void invokeListener​(de.gsi.dataset.event.UpdateEvent updateEvent,
                                    boolean executeParallel)
        invoke object within update listener list
        Specified by:
        invokeListener in interface de.gsi.dataset.event.EventSource
        Parameters:
        updateEvent - the event the listeners are notified with
        executeParallel - true execute event listener via parallel executor service
      • isAutoGrowRanging

        boolean isAutoGrowRanging()
        This is true when the axis determines its range from the data automatically and grows it if necessary
        Returns:
        true if axis shall be updated to the optimal data range
      • isAutoRanging

        boolean isAutoRanging()
        This is true when the axis determines its range from the data automatically
        Returns:
        true if axis shall be updated to the optimal data range
      • isAutoUnitScaling

        boolean isAutoUnitScaling()
        Returns:
        whether unit is automatically adjusted to multiples of 1e3 (kilo, mega, ...) or 1e-3 (milli, micro, ...)
      • isInvertedAxis

        boolean isInvertedAxis()
        This is true when the axis labels and data point order should be inverted
        Returns:
        true if axis shall be inverted (i.e. drawn from 'max->min', rather than the normal 'min->max')
      • isLogAxis

        boolean isLogAxis()
        This is true when the axis implements a log scale
        Returns:
        true if axis is log scale
      • isTimeAxis

        boolean isTimeAxis()
        This is true when the axis corresponds to a time axis
        Returns:
        true if axis is a time scale
      • isValueOnAxis

        boolean isValueOnAxis​(double value)
        Checks if the given value is plottable on this axis
        Parameters:
        value - The value to check if its on axis
        Returns:
        true if the given value is plottable on this axis
      • maxProperty

        javafx.beans.property.DoubleProperty maxProperty()
      • minProperty

        javafx.beans.property.DoubleProperty minProperty()
      • nameProperty

        javafx.beans.property.StringProperty nameProperty()
        Returns:
        the primary axis name/label property
      • requestAxisLayout

        void requestAxisLayout()
        Request that the axis is laid out in the next layout pass. This replaces requestLayout() as it has been overridden to do nothing so that changes to children's bounds etc do not cause a layout. This was done as a optimisation as the Axis knows the exact minimal set of changes that really need layout to be updated. So we only want to request layout then, not on any child change.
      • setAnimated

        void setAnimated​(boolean value)
        Parameters:
        value - true if axis range changes will be animated and false otherwise
      • setAutoGrowRanging

        void setAutoGrowRanging​(boolean value)
        This is true when the axis determines its range from the data automatically and grows it if necessary
        Parameters:
        value - true if axis shall be updated to the optimal data range and grows it if necessary
      • setAutoRanging

        void setAutoRanging​(boolean value)
        This is true when the axis determines its range from the data automatically
        Parameters:
        value - true if axis shall be updated to the optimal data range
      • setAutoUnitScaling

        void setAutoUnitScaling​(boolean value)
        Parameters:
        value - scaling value true -> scale to the nearest SI unit prefix
      • setName

        void setName​(java.lang.String value)
        Parameters:
        value - the new axis primary label
      • setSide

        void setSide​(Side newSide)
      • setTickUnit

        void setTickUnit​(double tickUnit)
      • setTimeAxis

        void setTimeAxis​(boolean value)
        This is true when the axis labels and data point should be plotted according to some time-axis definition
        Parameters:
        value - true if axis shall be drawn with time-axis labels
      • setUnit

        void setUnit​(java.lang.String value)
        Parameters:
        value - the new axis primary unit name
      • setUnitScaling

        void setUnitScaling​(double value)
        Parameters:
        value - the new axis primary unit label
      • setUnitScaling

        void setUnitScaling​(MetricPrefix value)
        Parameters:
        value - the new axis primary unit label
      • sideProperty

        javafx.beans.property.ObjectProperty<Side> sideProperty()
      • tickUnitProperty

        javafx.beans.property.DoubleProperty tickUnitProperty()
      • timeAxisProperty

        javafx.beans.property.BooleanProperty timeAxisProperty()
        This is true when the axis labels and data point should be plotted according to some time-axis definition
        Returns:
        the timeAxis property
      • unitProperty

        javafx.beans.property.ObjectProperty<java.lang.String> unitProperty()
        Returns:
        the primary unit name property
      • unitScalingProperty

        javafx.beans.property.DoubleProperty unitScalingProperty()
        Returns:
        the primary unit label property