Package de.gsi.chart.renderer.spi
Class GridRenderer
- java.lang.Object
-
- javafx.scene.Node
-
- javafx.scene.Parent
-
- javafx.scene.layout.Region
-
- javafx.scene.layout.Pane
-
- de.gsi.chart.renderer.spi.GridRenderer
-
-
Constructor Summary
Constructors Constructor Description GridRenderer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static voidapplyGraphicsStyleFromLineStyle(javafx.scene.canvas.GraphicsContext gc, javafx.scene.shape.Line style)protected voiddrawEuclideanGrid(javafx.scene.canvas.GraphicsContext gc, XYChart xyChart)protected voiddrawHorizontalMajorGridLines(javafx.scene.canvas.GraphicsContext gc, Axis yAxis, double xAxisWidthSnapped, double yAxisHeight)protected voiddrawHorizontalMinorGridLines(javafx.scene.canvas.GraphicsContext gc, Axis yAxis, double xAxisWidthSnapped, double yAxisHeight)javafx.scene.canvas.CanvasdrawLegendSymbol(de.gsi.dataset.DataSet dataSet, int dsIndex, int width, int height)javafx.beans.property.BooleanPropertydrawOnTopProperty()Indicates whether grid lines should be drawn on top or beneath graphsprotected voiddrawPolarCircle(javafx.scene.canvas.GraphicsContext gc, Axis yAxis, double yRange, double xCentre, double yCentre, double maxRadius)protected voiddrawPolarGrid(javafx.scene.canvas.GraphicsContext gc, XYChart xyChart)protected voiddrawVerticalMajorGridLines(javafx.scene.canvas.GraphicsContext gc, Axis xAxis, double xAxisWidth, double yAxisHeightSnapped)protected voiddrawVerticalMinorGridLines(javafx.scene.canvas.GraphicsContext gc, Axis xAxis, double xAxisWidth, double yAxisHeightSnapped)javafx.collections.ObservableList<Axis>getAxes()java.util.List<javafx.css.CssMetaData<? extends javafx.css.Styleable,?>>getCssMetaData()javafx.collections.ObservableList<de.gsi.dataset.DataSet>getDatasets()javafx.collections.ObservableList<de.gsi.dataset.DataSet>getDatasetsCopy()javafx.scene.shape.LinegetHorizontalMajorGrid()modify this to change drawing of horizontal major grid linesjavafx.scene.shape.LinegetHorizontalMinorGrid()modify this to change drawing of horizontal minor grid linesjavafx.scene.shape.LinegetVerticalMajorGrid()modify this to change drawing of vertical major grid linesjavafx.scene.shape.LinegetVerticalMinorGrid()modify this to change drawing of vertical minor grid linesjavafx.beans.property.BooleanPropertyhorizontalGridLinesVisibleProperty()Indicates whether horizontal major grid lines are visible or not.javafx.beans.property.BooleanPropertyhorizontalMinorGridLinesVisibleProperty()Indicates whether horizontal minor grid lines are visible or not.booleanisDrawOnTop()Indicates whether grid lines should be drawn on top or beneath graphsvoidrender(javafx.scene.canvas.GraphicsContext gc, Chart chart, int dataSetOffset, javafx.collections.ObservableList<de.gsi.dataset.DataSet> datasets)voidsetDrawOnTop(boolean state)Indicates whether grid lines should be drawn on top or beneath graphsRenderersetShowInLegend(boolean state)Sets whether DataSets attached to this renderer shall be shown in the legendbooleanshowInLegend()Sets whether DataSets attached to this renderer shall be shown in the legendjavafx.beans.property.BooleanPropertyshowInLegendProperty()Sets whether DataSets attached to this renderer shall be shown in the legendjavafx.beans.property.BooleanPropertyverticalGridLinesVisibleProperty()Indicates whether vertical major grid lines are visible or not.javafx.beans.property.BooleanPropertyverticalMinorGridLinesVisibleProperty()Indicates whether vertical minor grid lines are visible or not.-
Methods inherited from class javafx.scene.layout.Region
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, getBackground, getBorder, getClassCssMetaData, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, isResizable, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, snapToPixelProperty, widthProperty
-
Methods inherited from class javafx.scene.Parent
getBaselineOffset, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, layoutChildren, lookup, needsLayoutProperty, queryAccessibleAttribute, requestLayout, requestParentLayout, setNeedsLayout, updateBounds
-
Methods inherited from class javafx.scene.Node
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInitialFocusTraversable, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, getViewOrder, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visibleProperty
-
-
-
-
Field Detail
-
axesList
protected final javafx.collections.ObservableList<Axis> axesList
-
-
Method Detail
-
drawEuclideanGrid
protected void drawEuclideanGrid(javafx.scene.canvas.GraphicsContext gc, XYChart xyChart)
-
drawHorizontalMajorGridLines
protected void drawHorizontalMajorGridLines(javafx.scene.canvas.GraphicsContext gc, Axis yAxis, double xAxisWidthSnapped, double yAxisHeight)
-
drawHorizontalMinorGridLines
protected void drawHorizontalMinorGridLines(javafx.scene.canvas.GraphicsContext gc, Axis yAxis, double xAxisWidthSnapped, double yAxisHeight)
-
drawLegendSymbol
public javafx.scene.canvas.Canvas drawLegendSymbol(de.gsi.dataset.DataSet dataSet, int dsIndex, int width, int height)- Specified by:
drawLegendSymbolin interfaceRenderer- Parameters:
dataSet- the data set for which the representative icon should be generateddsIndex- index within renderer setwidth- requested width of the returning Canvasheight- requested height of the returning Canvas- Returns:
- a graphical icon representation of the given data sets
-
drawOnTopProperty
public final javafx.beans.property.BooleanProperty drawOnTopProperty()
Indicates whether grid lines should be drawn on top or beneath graphs- Returns:
- drawOnTop property
-
drawPolarCircle
protected void drawPolarCircle(javafx.scene.canvas.GraphicsContext gc, Axis yAxis, double yRange, double xCentre, double yCentre, double maxRadius)
-
drawPolarGrid
protected void drawPolarGrid(javafx.scene.canvas.GraphicsContext gc, XYChart xyChart)
-
drawVerticalMajorGridLines
protected void drawVerticalMajorGridLines(javafx.scene.canvas.GraphicsContext gc, Axis xAxis, double xAxisWidth, double yAxisHeightSnapped)
-
drawVerticalMinorGridLines
protected void drawVerticalMinorGridLines(javafx.scene.canvas.GraphicsContext gc, Axis xAxis, double xAxisWidth, double yAxisHeightSnapped)
-
getAxes
public javafx.collections.ObservableList<Axis> getAxes()
-
getCssMetaData
public java.util.List<javafx.css.CssMetaData<? extends javafx.css.Styleable,?>> getCssMetaData()
- Specified by:
getCssMetaDatain interfacejavafx.css.Styleable- Overrides:
getCssMetaDatain classjavafx.scene.layout.Region
-
getDatasets
public javafx.collections.ObservableList<de.gsi.dataset.DataSet> getDatasets()
- Specified by:
getDatasetsin interfaceRenderer
-
getDatasetsCopy
public javafx.collections.ObservableList<de.gsi.dataset.DataSet> getDatasetsCopy()
- Specified by:
getDatasetsCopyin interfaceRenderer
-
getHorizontalMajorGrid
public javafx.scene.shape.Line getHorizontalMajorGrid()
modify this to change drawing of horizontal major grid lines- Returns:
- the Line node to be styled
-
getHorizontalMinorGrid
public javafx.scene.shape.Line getHorizontalMinorGrid()
modify this to change drawing of horizontal minor grid lines- Returns:
- the Line node to be styled
-
getVerticalMajorGrid
public javafx.scene.shape.Line getVerticalMajorGrid()
modify this to change drawing of vertical major grid lines- Returns:
- the Line node to be styled
-
getVerticalMinorGrid
public javafx.scene.shape.Line getVerticalMinorGrid()
modify this to change drawing of vertical minor grid lines- Returns:
- the Line node to be styled
-
horizontalGridLinesVisibleProperty
public final javafx.beans.property.BooleanProperty horizontalGridLinesVisibleProperty()
Indicates whether horizontal major grid lines are visible or not.- Returns:
- verticalGridLinesVisible property
-
horizontalMinorGridLinesVisibleProperty
public final javafx.beans.property.BooleanProperty horizontalMinorGridLinesVisibleProperty()
Indicates whether horizontal minor grid lines are visible or not.- Returns:
- verticalGridLinesVisible property
-
isDrawOnTop
public final boolean isDrawOnTop()
Indicates whether grid lines should be drawn on top or beneath graphs- Returns:
- drawOnTop state
-
render
public void render(javafx.scene.canvas.GraphicsContext gc, Chart chart, int dataSetOffset, javafx.collections.ObservableList<de.gsi.dataset.DataSet> datasets)
-
setDrawOnTop
public final void setDrawOnTop(boolean state)
Indicates whether grid lines should be drawn on top or beneath graphs- Parameters:
state- true: draw on top
-
setShowInLegend
public Renderer setShowInLegend(boolean state)
Description copied from interface:RendererSets whether DataSets attached to this renderer shall be shown in the legend- Specified by:
setShowInLegendin interfaceRenderer- Parameters:
state- true (default) if data sets are supposed to be drawn- Returns:
- the renderer class
-
showInLegend
public boolean showInLegend()
Description copied from interface:RendererSets whether DataSets attached to this renderer shall be shown in the legend- Specified by:
showInLegendin interfaceRenderer- Returns:
- true (default) if data sets are supposed to be drawn
-
showInLegendProperty
public javafx.beans.property.BooleanProperty showInLegendProperty()
Description copied from interface:RendererSets whether DataSets attached to this renderer shall be shown in the legend- Specified by:
showInLegendPropertyin interfaceRenderer- Returns:
- true (default) if data sets are supposed to be drawn
-
verticalGridLinesVisibleProperty
public final javafx.beans.property.BooleanProperty verticalGridLinesVisibleProperty()
Indicates whether vertical major grid lines are visible or not.- Returns:
- verticalGridLinesVisible property
-
verticalMinorGridLinesVisibleProperty
public final javafx.beans.property.BooleanProperty verticalMinorGridLinesVisibleProperty()
Indicates whether vertical minor grid lines are visible or not.- Returns:
- verticalGridLinesVisible property
-
applyGraphicsStyleFromLineStyle
protected static void applyGraphicsStyleFromLineStyle(javafx.scene.canvas.GraphicsContext gc, javafx.scene.shape.Line style)
-
-