public class ChartOverlay extends ChartPlugin
chart pane or chart's plot area
with given node i.e. the bounds of the node are set to cover the indicated area.
Typically the node would be a an instance of Pane containing child nodes. The example below shows how to add
a Label to the chart pane, located in the left top corner of the plot area:
XYChartPane<Number, Number> chartPane = ...;
Label label = new Label("Info about chart data");
AnchorPane.setTopAnchor(label, 5.0);
AnchorPane.setLeftAnchor(label, 5.0);
AnchorPane anchorPane = new AnchorPane(label);
// Pass any mouse events to the underlying chart
anchorPane.setMouseTransparent(true);
chartPane.getPlugins().add(new ChartOverlay<>(OverlayArea.PLOT_AREA, anchorPane));
| Type | Property and Description |
|---|---|
ObjectProperty<Node> |
node
The node to be overlaid on top of the
overlay area. |
ObjectProperty<ChartOverlay.OverlayArea> |
overlayArea
Specifies the
ChartOverlay.OverlayArea to be covered by the node. |
addButtonsToToolBarProperty, chartProperty| Modifier and Type | Class and Description |
|---|---|
static class |
ChartOverlay.OverlayArea
Defines possible areas to be overlaid.
|
| Constructor and Description |
|---|
ChartOverlay(ChartOverlay.OverlayArea area)
Creates a new, empty
ChartOverlay, initialized to overlay the specified area. |
ChartOverlay(ChartOverlay.OverlayArea area,
Node node)
Creates a new
ChartOverlay, initialized to overlay the specified area with given node. |
| Modifier and Type | Method and Description |
|---|---|
Node |
getNode()
Returns the value of the
nodeProperty(). |
ChartOverlay.OverlayArea |
getOverlayArea()
Returns the value of the
overlayAreaProperty(). |
void |
layoutChildren()
Optional method that allows the plug-in to react in case the size of the chart that it belongs to has changed.
|
ObjectProperty<Node> |
nodeProperty()
The node to be overlaid on top of the
overlay area. |
ObjectProperty<ChartOverlay.OverlayArea> |
overlayAreaProperty()
Specifies the
ChartOverlay.OverlayArea to be covered by the node. |
void |
setNode(Node newNode)
Sets the value of the
nodeProperty(). |
void |
setOverlayArea(ChartOverlay.OverlayArea area)
Sets the value of the
overlayAreaProperty(). |
addButtonsToToolBarProperty, chartProperty, getChart, getChartChildren, getLocationInPlotArea, isAddButtonsToToolBar, registerInputEventHandler, setAddButtonsToToolBar, setChart, toDataPoint, toDisplayPointpublic final ObjectProperty<Node> nodeProperty
overlay area.getNode(),
setNode(Node)public final ObjectProperty<ChartOverlay.OverlayArea> overlayAreaProperty
ChartOverlay.OverlayArea to be covered by the node.getOverlayArea(),
setOverlayArea(OverlayArea)public ChartOverlay(ChartOverlay.OverlayArea area)
ChartOverlay, initialized to overlay the specified area.area - value of overlayAreaProperty()public ChartOverlay(ChartOverlay.OverlayArea area, Node node)
ChartOverlay, initialized to overlay the specified area with given node.area - value of overlayAreaProperty()node - value of the nodeProperty()public final Node getNode()
nodeProperty().public final ChartOverlay.OverlayArea getOverlayArea()
overlayAreaProperty().public void layoutChildren()
ChartPluginlayoutChildren in class ChartPluginpublic final ObjectProperty<Node> nodeProperty()
overlay area.getNode(),
setNode(Node)public final ObjectProperty<ChartOverlay.OverlayArea> overlayAreaProperty()
ChartOverlay.OverlayArea to be covered by the node.getOverlayArea(),
setOverlayArea(OverlayArea)public final void setNode(Node newNode)
nodeProperty().newNode - the node to overlaidpublic final void setOverlayArea(ChartOverlay.OverlayArea area)
overlayAreaProperty().area - the area to be coveredCopyright © 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH. All rights reserved.