public abstract class AbstractSingleValueIndicator extends AbstractValueIndicator
text label describing the value.| Type | Property and Description |
|---|---|
DoubleProperty |
labelPosition
Relative position, between 0.0 (left, bottom) and 1.0 (right, top) of the description
label in the plot area. |
DoubleProperty |
pickingDistance
Distance of the mouse cursor from the line (in pixel) that should trigger the moving of the line.
|
DoubleProperty |
value
Value indicated by this plugin.
|
editableIndicatorProperty, labelHorizontalAnchorProperty, labelVerticalAnchorProperty, textPropertyaddButtonsToToolBarProperty, chartPropertyAbstractValueIndicator.Delta| Modifier and Type | Field and Description |
|---|---|
protected static int |
DEFAULT_PICKING_DISTANCE
The default distance between the data point coordinates and mouse cursor that triggers shifting the line.
|
protected Line |
line
Line indicating the value.
|
protected static double |
MIDDLE_POSITION |
protected Line |
pickLine |
protected static String |
STYLE_CLASS_LABEL |
protected static String |
STYLE_CLASS_LINE |
protected static String |
STYLE_CLASS_MARKER |
protected Polygon |
triangle
small triangle marker as handler to shift the line marker
|
protected static double |
triangleHalfWidth |
dragDelta, editableIndicator, label| Modifier | Constructor and Description |
|---|---|
protected |
AbstractSingleValueIndicator(Axis axis,
double value,
String text)
Creates a new instance of AbstractSingleValueIndicator.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getLabelPosition()
Returns the value of the
labelPositionProperty(). |
double |
getPickingDistance()
Returns the value of the
pickingDistanceProperty(). |
double |
getValue()
Returns the indicated value.
|
DoubleProperty |
labelPositionProperty()
Relative position, between 0.0 (left, bottom) and 1.0 (right, top) of the description
label in the plot area. |
protected void |
layoutLine(double startX,
double startY,
double endX,
double endY)
Sets the line coordinates.
|
protected void |
layoutMarker(double startX,
double startY,
double endX,
double endY)
Sets the marker coordinates.
|
DoubleProperty |
pickingDistanceProperty()
Distance of the mouse cursor from the line (in pixel) that should trigger the moving of the line.
|
void |
setLabelPosition(double value)
Sets the new value of the
labelPositionProperty(). |
void |
setPickingDistance(double distance)
Sets the value of
pickingDistanceProperty(). |
void |
setValue(double newValue)
Sets the value that should be indicated.
|
DoubleProperty |
valueProperty()
Value indicated by this plugin.
|
addChildNodeIfNotPresent, editableIndicatorProperty, getLabelHorizontalAnchor, getLabelVerticalAnchor, getNumericAxis, getText, isEditable, labelHorizontalAnchorProperty, labelVerticalAnchorProperty, layoutLabel, setEditable, setLabelHorizontalAnchor, setLabelVerticalAnchor, setStyleClasses, setText, textProperty, updateStyleClassaddButtonsToToolBarProperty, chartProperty, getChart, getChartChildren, getLocationInPlotArea, isAddButtonsToToolBar, layoutChildren, registerInputEventHandler, setAddButtonsToToolBar, setChart, toDataPoint, toDisplayPointpublic final DoubleProperty labelPositionProperty
label in the plot area.
Default value: 0.5
getLabelPosition(),
setLabelPosition(double)public final DoubleProperty pickingDistanceProperty
getPickingDistance(),
setPickingDistance(double)public final DoubleProperty valueProperty
getValue(),
setValue(double)protected static final int DEFAULT_PICKING_DISTANCE
protected static final double MIDDLE_POSITION
protected static final String STYLE_CLASS_LABEL
protected static final String STYLE_CLASS_LINE
protected static final String STYLE_CLASS_MARKER
protected static double triangleHalfWidth
protected final Line line
protected final Line pickLine
protected final Polygon triangle
protected AbstractSingleValueIndicator(Axis axis, double value, String text)
axis - reference axisvalue - a X value to be indicatedtext - the text to be shown by the label. Value of AbstractValueIndicator.textProperty().public final double getLabelPosition()
labelPositionProperty().text labelpublic final double getPickingDistance()
pickingDistanceProperty().public final double getValue()
public final DoubleProperty labelPositionProperty()
label in the plot area.
Default value: 0.5
getLabelPosition(),
setLabelPosition(double)protected void layoutLine(double startX,
double startY,
double endX,
double endY)
startX - start x coordinatestartY - start y coordinateendX - stop x coordinateendY - stop y coordinateprotected void layoutMarker(double startX,
double startY,
double endX,
double endY)
startX - start x coordinatestartY - start y coordinateendX - stop x coordinateendY - stop y coordinatepublic final DoubleProperty pickingDistanceProperty()
getPickingDistance(),
setPickingDistance(double)public final void setLabelPosition(double value)
labelPositionProperty().value - the label position, between 0.0 and 1.0 (both inclusive)public final void setPickingDistance(double distance)
pickingDistanceProperty().distance - the new picking distancepublic final void setValue(double newValue)
newValue - value to be indicatedpublic final DoubleProperty valueProperty()
getValue(),
setValue(double)Copyright © 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH. All rights reserved.