Class XValueIndicator


  • public class XValueIndicator
    extends AbstractSingleValueIndicator
    A vertical line drawn on the plot area, indicating specified X value, with an optional text label describing the value.

    Style Classes (from least to most specific):

    • Label: value-indicator-label, x-value-indicator-label, x-value-indicator-label[index]
    • Line: value-indicator-line, x-value-indicator-line, x-value-indicator-line[index]
    where [index] corresponds to the index (zero based) of this indicator instance added to the XYChartPane. For example class x-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

      • XValueIndicator

        public XValueIndicator​(Axis axis,
                               double value)
        Creates a new instance of the indicator.
        Parameters:
        axis - the axis this indicator is associated with
        value - a X value to be indicated
      • XValueIndicator

        public XValueIndicator​(Axis axis,
                               double value,
                               java.lang.String text)
        Creates a new instance of the indicator.
        Parameters:
        axis - the axis this indicator is associated with
        value - a X value to be indicated
        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