Class AbstractValueIndicator

    • Field Detail

      • label

        protected final javafx.scene.control.Label label
      • editableIndicator

        protected final javafx.beans.property.BooleanProperty editableIndicator
    • Constructor Detail

      • AbstractValueIndicator

        protected AbstractValueIndicator​(Axis axis,
                                         java.lang.String text)
        Creates a new instance of the indicator.
        Parameters:
        axis - the axis this indicator is associated with
        text - the text to be shown by the label. Value of textProperty().
    • Method Detail

      • addChildNodeIfNotPresent

        protected void addChildNodeIfNotPresent​(javafx.scene.Node node)
      • editableIndicatorProperty

        public final javafx.beans.property.BooleanProperty editableIndicatorProperty()
        whether this plugin is editable
        Returns:
        boolean property
      • getLabelHorizontalAnchor

        public final javafx.geometry.HPos getLabelHorizontalAnchor()
        Returns the value of the labelHorizontalAnchorProperty().
        Returns:
        value of the labelHorizontalAnchor property
      • getLabelVerticalAnchor

        public final javafx.geometry.VPos getLabelVerticalAnchor()
        Returns the value of the labelVerticalAnchorProperty().
        Returns:
        value of the labelVerticalAnchor property
      • getNumericAxis

        @Deprecated
        protected Axis getNumericAxis()
        Deprecated.
        Returns the Axis that this indicator is associated with.
        Returns:
        associated Axis
      • getAxis

        public Axis getAxis()
        Returns the Axis that this indicator is associated with.
        Returns:
        associated Axis
      • getText

        public final java.lang.String getText()
        Returns the value of the textProperty().
        Returns:
        text displayed within or next to the indicator
      • isEditable

        public final boolean isEditable()
        Returns:
        whether this plugin is editable
      • labelHorizontalAnchorProperty

        public final javafx.beans.property.ObjectProperty<javafx.geometry.HPos> labelHorizontalAnchorProperty()
        Specifies anchor of the text label with respect to the horizontal label position i.e. it describes whether the position is related to the LEFT, CENTER or RIGHT side of the label. The position itself should be specified by the extending classes.

        Default value: HPos.CENTER

        Returns:
        labelHorizontalAnchor property
      • labelVerticalAnchorProperty

        public final javafx.beans.property.ObjectProperty<javafx.geometry.VPos> labelVerticalAnchorProperty()
        Specifies anchor of the text label with respect to the vertical label position i.e. it describes whether the position is related to the TOP, CENTER, BASELINE or BOTTOM of of the label. The position itself should be specified by the extending classes.

        Default value: VPos.CENTER

        Returns:
        labelVerticalAnchor property
      • layoutLabel

        protected final void layoutLabel​(javafx.geometry.Bounds bounds,
                                         double hPos,
                                         double vPos)
        Layouts the label within specified bounds and given horizontal and vertical position, taking into account horizontal and vertical anchor.
        Parameters:
        bounds - the bounding rectangle with respect to which the label should be positioned
        hPos - relative [0, 1] horizontal position of the label within the bounds
        vPos - relative [0, 1] vertical position of the label within the bounds
      • setEditable

        public final void setEditable​(boolean newState)
        Sets the state whether this plugin is editable
        Parameters:
        newState - true: edits are allowed
      • setLabelHorizontalAnchor

        public final void setLabelHorizontalAnchor​(javafx.geometry.HPos anchor)
        Sets the value of the labelHorizontalAnchorProperty().
        Parameters:
        anchor - new anchor
      • setLabelVerticalAnchor

        public final void setLabelVerticalAnchor​(javafx.geometry.VPos anchor)
        Sets the value of the labelVerticalAnchorProperty().
        Parameters:
        anchor - new anchor
      • setStyleClasses

        public void setStyleClasses​(javafx.scene.Node node,
                                    java.lang.String prefix,
                                    java.lang.String root)
      • setText

        public final void setText​(java.lang.String text)
        Sets the value of the textProperty().
        Parameters:
        text - the new text. If null, the label will be hidden.
      • textProperty

        public final javafx.beans.property.StringProperty textProperty()
        Text to be displayed by the label. If set to null, the label is not shown.
        Returns:
        text of the indicator's label
      • updateStyleClass

        public abstract void updateStyleClass()
        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.