Package de.gsi.chart.plugins
Class YValueIndicator
- java.lang.Object
-
- de.gsi.chart.plugins.ChartPlugin
-
- de.gsi.chart.plugins.AbstractValueIndicator
-
- de.gsi.chart.plugins.AbstractSingleValueIndicator
-
- de.gsi.chart.plugins.YValueIndicator
-
- All Implemented Interfaces:
ValueIndicator
,de.gsi.dataset.event.EventSource
public class YValueIndicator extends AbstractSingleValueIndicator implements de.gsi.dataset.event.EventSource, ValueIndicator
A horizontal line drawn on the plot area, indicating specified Y value, with an optionaltext label
describing the value.Style Classes (from least to most specific):
- Label:
value-indicator-label, y-value-indicator-label, y-value-indicator-label[index]
- Line:
value-indicator-line, y-value-indicator-line, y-value-indicator-line[index]
[index]
corresponds to the index (zero based) of this indicator instance added to theXYChartPane
. For example classy-value-indicator-label1
can be used to style label of the second instance of this indicator added to the chart pane.- Author:
- mhrabia
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.gsi.chart.plugins.AbstractValueIndicator
AbstractValueIndicator.Delta
-
-
Field Summary
-
Fields inherited from class de.gsi.chart.plugins.AbstractSingleValueIndicator
DEFAULT_PICKING_DISTANCE, line, MIDDLE_POSITION, pickLine, STYLE_CLASS_LABEL, STYLE_CLASS_LINE, STYLE_CLASS_MARKER, triangle, triangleHalfWidth
-
Fields inherited from class de.gsi.chart.plugins.AbstractValueIndicator
dragDelta, editableIndicator, label, labelEdit
-
-
Constructor Summary
Constructors Constructor Description YValueIndicator(Axis axis, double value)
Creates a new instance indicating given Y value belonging to the specifiedyAxis
.YValueIndicator(Axis axis, double value, java.lang.String text)
Creates a new instance indicating given Y value belonging to the specifiedyAxis
, with the specifiedlabel
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
handleDragMouseEvent(javafx.scene.input.MouseEvent mouseEvent)
void
layoutChildren()
Optional method that allows the plug-in to react in case the size of the chart that it belongs to has changed.void
updateStyleClass()
There might be several instances of a given indicator class.-
Methods inherited from class de.gsi.chart.plugins.AbstractSingleValueIndicator
autoNotification, getLabelPosition, getPickingDistance, getValue, isAutoRemove, labelPositionProperty, layoutLine, layoutMarker, pickingDistanceProperty, setAutoRemove, setLabelPosition, setPickingDistance, setValue, updateEventListener, valueProperty
-
Methods inherited from class de.gsi.chart.plugins.AbstractValueIndicator
addChildNodeIfNotPresent, editableIndicatorProperty, getAxis, getLabelHorizontalAnchor, getLabelVerticalAnchor, getText, isEditable, labelHorizontalAnchorProperty, labelVerticalAnchorProperty, layoutLabel, setEditable, setLabelHorizontalAnchor, setLabelVerticalAnchor, setStyleClasses, setText, textProperty
-
Methods inherited from class de.gsi.chart.plugins.ChartPlugin
addButtonsToToolBarProperty, chartProperty, getChart, getChartChildren, getLocationInPlotArea, isAddButtonsToToolBar, registerInputEventHandler, setAddButtonsToToolBar, setChart, toDataPoint, toDisplayPoint
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.gsi.dataset.event.EventSource
addListener, autoNotification, invokeListener, invokeListener, invokeListener, isAutoNotification, removeListener, updateEventListener
-
Methods inherited from interface de.gsi.chart.plugins.ValueIndicator
getAxis, getText, getValue, setText, setValue, valueProperty
-
-
-
-
Constructor Detail
-
YValueIndicator
public YValueIndicator(Axis axis, double value)
Creates a new instance indicating given Y value belonging to the specifiedyAxis
.- Parameters:
axis
- the axis this indicator is associated withvalue
- a value to be marked
-
YValueIndicator
public YValueIndicator(Axis axis, double value, java.lang.String text)
Creates a new instance indicating given Y value belonging to the specifiedyAxis
, with the specifiedlabel
.- Parameters:
axis
- the axis this indicator is associated withvalue
- a value to be markedtext
- the text to be shown by the label. Value ofAbstractValueIndicator.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 classChartPlugin
-
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 classAbstractValueIndicator
-
-