Package de.gsi.chart.plugins
Class AbstractRangeValueIndicator
- java.lang.Object
-
- de.gsi.chart.plugins.ChartPlugin
-
- de.gsi.chart.plugins.AbstractValueIndicator
-
- de.gsi.chart.plugins.AbstractRangeValueIndicator
-
- Direct Known Subclasses:
XRangeIndicator,YRangeIndicator
public abstract class AbstractRangeValueIndicator extends AbstractValueIndicator
Plugin indicating a value range as a rectangle drawn on the plot area, with an optionaltext labeldescribing the range.- Author:
- mhrabia
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.gsi.chart.plugins.AbstractValueIndicator
AbstractValueIndicator.Delta
-
-
Field Summary
Fields Modifier and Type Field Description protected javafx.scene.shape.RectanglerectangleRectangle indicating the range.protected static java.lang.StringSTYLE_CLASS_LABELprotected static java.lang.StringSTYLE_CLASS_RECT-
Fields inherited from class de.gsi.chart.plugins.AbstractValueIndicator
dragDelta, editableIndicator, label
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractRangeValueIndicator(Axis axis, double lowerBound, double upperBound, java.lang.String text)Creates a new instance of the indicator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetLabelHorizontalPosition()Returns the value of thelabelHorizontalPositionProperty().doublegetLabelVerticalPosition()Returns the value of thelabelVerticalPositionProperty().doublegetLowerBound()Returns the value of thelowerBoundProperty().doublegetUpperBound()Returns the value of theupperBoundProperty().javafx.beans.property.DoublePropertylabelHorizontalPositionProperty()Relative horizontal position of thetext labelon the plot area, with value between 0.0 (left) and 1.0 (right).javafx.beans.property.DoublePropertylabelVerticalPositionProperty()Relative vertical position of thetext labelon the plot area, with value between 0.0 (bottom) and 1.0 (top).protected voidlayout(javafx.geometry.Bounds bounds)Layouts the rectangle and label within given bounds.javafx.beans.property.DoublePropertylowerBoundProperty()Lower bound (min value) of the range to be indicated.voidsetLabelHorizontalPosition(double value)Sets the new value of thelabelHorizontalPositionProperty().voidsetLabelVerticalPosition(double value)Sets the new value of thelabelVerticalPositionProperty().voidsetLowerBound(double value)Sets the value of thelowerBoundProperty()voidsetUpperBound(double value)Sets the value ofupperBoundProperty()javafx.beans.property.DoublePropertyupperBoundProperty()Upper bound (max value) of the range to be indicated.-
Methods inherited from class de.gsi.chart.plugins.AbstractValueIndicator
addChildNodeIfNotPresent, editableIndicatorProperty, getLabelHorizontalAnchor, getLabelVerticalAnchor, getNumericAxis, getText, isEditable, labelHorizontalAnchorProperty, labelVerticalAnchorProperty, layoutLabel, setEditable, setLabelHorizontalAnchor, setLabelVerticalAnchor, setStyleClasses, setText, textProperty, updateStyleClass
-
Methods inherited from class de.gsi.chart.plugins.ChartPlugin
addButtonsToToolBarProperty, chartProperty, getChart, getChartChildren, getLocationInPlotArea, isAddButtonsToToolBar, layoutChildren, registerInputEventHandler, setAddButtonsToToolBar, setChart, toDataPoint, toDisplayPoint
-
-
-
-
Field Detail
-
STYLE_CLASS_LABEL
protected static final java.lang.String STYLE_CLASS_LABEL
- See Also:
- Constant Field Values
-
STYLE_CLASS_RECT
protected static final java.lang.String STYLE_CLASS_RECT
- See Also:
- Constant Field Values
-
rectangle
protected final javafx.scene.shape.Rectangle rectangle
Rectangle indicating the range.
-
-
Constructor Detail
-
AbstractRangeValueIndicator
protected AbstractRangeValueIndicator(Axis axis, double lowerBound, double upperBound, java.lang.String text)
Creates a new instance of the indicator.- Parameters:
axis- the axis this indicator is associated withlowerBound- lower bound (min value) of the rangeupperBound- upper bound (max value) of the rangetext- the text to be shown by the label. Value ofAbstractValueIndicator.textProperty().
-
-
Method Detail
-
getLabelHorizontalPosition
public final double getLabelHorizontalPosition()
Returns the value of thelabelHorizontalPositionProperty().- Returns:
- relative horizontal position of the
text label
-
getLabelVerticalPosition
public final double getLabelVerticalPosition()
Returns the value of thelabelVerticalPositionProperty().- Returns:
- relative vertical position of the
text label
-
getLowerBound
public final double getLowerBound()
Returns the value of thelowerBoundProperty().- Returns:
- lower bound of the range to be indicated
-
getUpperBound
public final double getUpperBound()
Returns the value of theupperBoundProperty().- Returns:
- upper bound (max value) of the range to be indicated
-
labelHorizontalPositionProperty
public final javafx.beans.property.DoubleProperty labelHorizontalPositionProperty()
Relative horizontal position of thetext labelon the plot area, with value between 0.0 (left) and 1.0 (right). Value 0.5 will position the label in the middle of the plot area.- Returns:
- labelHorizontalPosition property
-
labelVerticalPositionProperty
public final javafx.beans.property.DoubleProperty labelVerticalPositionProperty()
Relative vertical position of thetext labelon the plot area, with value between 0.0 (bottom) and 1.0 (top). Value 0.5 will position the label in the middle of the plot area.- Returns:
- labelVerticalPosition property
-
layout
protected void layout(javafx.geometry.Bounds bounds)
Layouts the rectangle and label within given bounds.- Parameters:
bounds- our own bounds in relation to the plot area bounds
-
lowerBoundProperty
public final javafx.beans.property.DoubleProperty lowerBoundProperty()
Lower bound (min value) of the range to be indicated.- Returns:
- lowerBound property
-
setLabelHorizontalPosition
public final void setLabelHorizontalPosition(double value)
Sets the new value of thelabelHorizontalPositionProperty().- Parameters:
value- the new horizontal position, between 0.0 and 1.0 (both inclusive)
-
setLabelVerticalPosition
public final void setLabelVerticalPosition(double value)
Sets the new value of thelabelVerticalPositionProperty().- Parameters:
value- the new vertical position, between 0.0 and 1.0 (both inclusive)
-
setLowerBound
public final void setLowerBound(double value)
Sets the value of thelowerBoundProperty()- Parameters:
value- the value for the lower bound of the indicator
-
setUpperBound
public final void setUpperBound(double value)
Sets the value ofupperBoundProperty()- Parameters:
value- upper bound (max value) of the range to be indicated
-
upperBoundProperty
public final javafx.beans.property.DoubleProperty upperBoundProperty()
Upper bound (max value) of the range to be indicated.- Returns:
- upperBound property
-
-