Class AbstractSingleValueIndicator

    • Field Detail

      • DEFAULT_PICKING_DISTANCE

        protected static final int DEFAULT_PICKING_DISTANCE
        The default distance between the data point coordinates and mouse cursor that triggers shifting the line.
        See Also:
        Constant Field Values
      • STYLE_CLASS_LABEL

        protected static final java.lang.String STYLE_CLASS_LABEL
        See Also:
        Constant Field Values
      • STYLE_CLASS_LINE

        protected static final java.lang.String STYLE_CLASS_LINE
        See Also:
        Constant Field Values
      • STYLE_CLASS_MARKER

        protected static final java.lang.String STYLE_CLASS_MARKER
        See Also:
        Constant Field Values
      • triangleHalfWidth

        protected static double triangleHalfWidth
      • line

        protected final javafx.scene.shape.Line line
        Line indicating the value.
      • pickLine

        protected final javafx.scene.shape.Line pickLine
      • triangle

        protected final javafx.scene.shape.Polygon triangle
        small triangle marker as handler to shift the line marker
    • Constructor Detail

      • AbstractSingleValueIndicator

        protected AbstractSingleValueIndicator​(Axis axis,
                                               double value,
                                               java.lang.String text)
        Creates a new instance of AbstractSingleValueIndicator.
        Parameters:
        axis - reference axis
        value - a X value to be indicated
        text - the text to be shown by the label. Value of AbstractValueIndicator.textProperty().
    • Method Detail

      • pickingDistanceProperty

        public final javafx.beans.property.DoubleProperty pickingDistanceProperty()
        Distance of the mouse cursor from the line (in pixel) that should trigger the moving of the line. By default initialized to 30.
        Returns:
        the picking distance property
      • setPickingDistance

        public final void setPickingDistance​(double distance)
        Sets the value of pickingDistanceProperty().
        Parameters:
        distance - the new picking distance
      • getPickingDistance

        public final double getPickingDistance()
        Returns the value of the pickingDistanceProperty().
        Returns:
        the current picking distance
      • valueProperty

        public final javafx.beans.property.DoubleProperty valueProperty()
        Value indicated by this plugin.
        Returns:
        value property
      • getValue

        public final double getValue()
        Returns the indicated value.
        Returns:
        indicated value
      • setValue

        public final void setValue​(double newValue)
        Sets the value that should be indicated.
        Parameters:
        newValue - value to be indicated
      • labelPositionProperty

        public final javafx.beans.property.DoubleProperty labelPositionProperty()
        Relative position, between 0.0 (left, bottom) and 1.0 (right, top) of the description label in the plot area.

        Default value: 0.5

        Returns:
        labelPosition property
      • setLabelPosition

        public final void setLabelPosition​(double value)
        Sets the new value of the labelPositionProperty().
        Parameters:
        value - the label position, between 0.0 and 1.0 (both inclusive)
      • layoutLine

        protected void layoutLine​(double startX,
                                  double startY,
                                  double endX,
                                  double endY)
        Sets the line coordinates.
        Parameters:
        startX - start x coordinate
        startY - start y coordinate
        endX - stop x coordinate
        endY - stop y coordinate
      • layoutMarker

        protected void layoutMarker​(double startX,
                                    double startY,
                                    double endX,
                                    double endY)
        Sets the marker coordinates.
        Parameters:
        startX - start x coordinate
        startY - start y coordinate
        endX - stop x coordinate
        endY - stop y coordinate