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
-
public class YValueIndicator extends AbstractSingleValueIndicator
A horizontal line drawn on the plot area, indicating specified Y value, with an optionaltext labeldescribing 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-label1can be used to style label of the second instance of this indicator added to the chart pane.- Author:
- mhrabia
- Label:
-
-
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
-
-
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 voidhandleDragMouseEvent(javafx.scene.input.MouseEvent mouseEvent)voidlayoutChildren()Optional method that allows the plug-in to react in case the size of the chart that it belongs to has changed.voidupdateStyleClass()There might be several instances of a given indicator class.-
Methods inherited from class de.gsi.chart.plugins.AbstractSingleValueIndicator
getLabelPosition, getPickingDistance, getValue, labelPositionProperty, layoutLine, layoutMarker, pickingDistanceProperty, setLabelPosition, setPickingDistance, setValue, valueProperty
-
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
-
Methods inherited from class de.gsi.chart.plugins.ChartPlugin
addButtonsToToolBarProperty, chartProperty, getChart, getChartChildren, getLocationInPlotArea, isAddButtonsToToolBar, registerInputEventHandler, setAddButtonsToToolBar, setChart, toDataPoint, toDisplayPoint
-
-
-
-
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:ChartPluginOptional method that allows the plug-in to react in case the size of the chart that it belongs to has changed.- Overrides:
layoutChildrenin classChartPlugin
-
updateStyleClass
public void updateStyleClass()
Description copied from class:AbstractValueIndicatorThere 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:
updateStyleClassin classAbstractValueIndicator
-
-