Class YValueIndicator

  • All Implemented Interfaces:
    ValueIndicator, de.gsi.dataset.event.EventSource

    public class YValueIndicator
    extends AbstractSingleValueIndicator
    implements de.gsi.dataset.event.EventSource, ValueIndicator
    A horizontal line drawn on the plot area, indicating specified Y value, with an optional text label describing the value.

    Style Classes (from least to most specific):

    • Label: value-indicator-label, y-value-indicator-label, y-value-indicator-label[index]
    • Line: value-indicator-line, y-value-indicator-line, y-value-indicator-line[index]
    where [index] corresponds to the index (zero based) of this indicator instance added to the XYChartPane. For example class y-value-indicator-label1 can be used to style label of the second instance of this indicator added to the chart pane.
    Author:
    mhrabia
    • Constructor Detail

      • YValueIndicator

        public YValueIndicator​(Axis axis,
                               double value)
        Creates a new instance indicating given Y value belonging to the specified yAxis.
        Parameters:
        axis - the axis this indicator is associated with
        value - a value to be marked
      • YValueIndicator

        public YValueIndicator​(Axis axis,
                               double value,
                               java.lang.String text)
        Creates a new instance indicating given Y value belonging to the specified yAxis, with the specified label.
        Parameters:
        axis - the axis this indicator is associated with
        value - a value to be marked
        text - the text to be shown by the label. Value of AbstractValueIndicator.textProperty().
    • Method Detail

      • handleDragMouseEvent

        protected void handleDragMouseEvent​(javafx.scene.input.MouseEvent mouseEvent)
      • layoutChildren

        public void layoutChildren()
        Description copied from class: ChartPlugin
        Optional method that allows the plug-in to react in case the size of the chart that it belongs to has changed.
        Overrides:
        layoutChildren in class ChartPlugin
      • updateStyleClass

        public void updateStyleClass()
        Description copied from class: AbstractValueIndicator
        There might be several instances of a given indicator class. If one wants to specify different CSS for each instance - we need a unique class name for each, so whenever the list of plugins changes, this method should update name of it's CSS class.
        Specified by:
        updateStyleClass in class AbstractValueIndicator