public class Chart3DCanvas extends javafx.scene.canvas.Canvas implements Chart3DChangeListener
Chart3D in JavaFX. This node
handles mouse events and tooltips but does not provide a context menu or
toolbar (these features are provided by the Chart3DViewer class.)accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, cacheHintProperty, cacheProperty, clipProperty, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, focusedProperty, focusTraversableProperty, hoverProperty, idProperty, impl_showMnemonicsProperty, impl_treeVisibleProperty, inputMethodRequestsProperty, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParentTransformProperty, localToSceneTransformProperty, managedProperty, mouseTransparentProperty, nodeOrientationProperty, 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, pickOnBoundsProperty, pressedProperty, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, styleProperty, translateXProperty, translateYProperty, translateZProperty, visibleProperty| Constructor and Description |
|---|
Chart3DCanvas(Chart3D chart)
Creates a new canvas to display the supplied chart in JavaFX.
|
| Modifier and Type | Method and Description |
|---|---|
void |
chartChanged(Chart3DChangeEvent event)
Called to inform that a chart change event has occurred.
|
void |
draw()
Draws the content of the canvas and updates the
renderingInfo attribute with the latest rendering
information. |
Chart3D |
getChart()
Returns the chart that is being displayed by this node.
|
double |
getMargin()
Returns the margin that is used when zooming to fit.
|
double |
getMaxViewingDistanceMultiplier()
Returns the multiplier used to calculate the maximum permitted distance
between the viewing point and the origin.
|
double |
getMinViewingDistance()
Returns the minimum distance between the viewing point and the origin.
|
double |
getPanIncrement()
Returns the increment for panning left and right.
|
RenderingInfo |
getRenderingInfo()
Returns the rendering info from the most recent drawing of the chart.
|
double |
getRotateIncrement()
Returns the increment for rotating up and down.
|
boolean |
isResizable()
Return
true to indicate the canvas is resizable. |
boolean |
isRotateViewEnabled()
Returns a flag that controls whether or not rotation by mouse dragging
is enabled.
|
boolean |
isTooltipEnabled()
Returns the flag that controls whether or not tooltips are enabled.
|
void |
setChart(Chart3D chart)
Sets the chart to be displayed by this node.
|
void |
setMargin(double margin)
Sets the margin (note that this will not have an immediate effect, it
will only be applied on the next call to
zoomToFit(double, double)). |
void |
setMaxViewingDistanceMultiplier(double multiplier)
Sets the multiplier used to calculate the maximum viewing distance.
|
void |
setMinViewingDistance(double minViewingDistance)
Sets the minimum between the viewing point and the origin.
|
void |
setPanIncrement(double increment)
Sets the increment for panning left and right (an angle measured in
radians).
|
void |
setRotateIncrement(double increment)
Sets the increment for rotating up and down (an angle measured in
radians).
|
void |
setRotateViewEnabled(boolean enabled)
Sets the flag that controls whether or not rotation by mouse dragging
is enabled.
|
void |
setTooltipEnabled(boolean tooltipEnabled)
Sets the flag that controls whether or not tooltips are enabled.
|
protected void |
updateTooltip(javafx.scene.input.MouseEvent me)
Updates the tooltip.
|
void |
zoomToFit(double width,
double height)
Adjusts the viewing distance so that the chart fits the specified
size.
|
getGraphicsContext2D, getHeight, getWidth, heightProperty, impl_computeContains, impl_computeGeomBounds, impl_createPeer, impl_processMXNode, impl_updatePeer, setHeight, setWidth, widthPropertyaccessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, containsBounds, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBaselineOffset, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClassCssMetaData, getClip, getContentBias, getCssMetaData, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, 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, hasProperties, hoverProperty, idProperty, impl_clearDirty, impl_computeIntersects, impl_computeLayoutBounds, impl_cssGetCursorInitialValue, impl_cssGetFocusTraversableInitialValue, impl_findStyles, impl_geomChanged, impl_getLeafTransform, impl_getMatchingStyles, impl_getPeer, impl_getPivotX, impl_getPivotY, impl_getPivotZ, impl_getStyleMap, impl_hasTransforms, impl_intersects, impl_intersectsBounds, impl_isDirty, impl_isDirtyEmpty, impl_isShowMnemonics, impl_isTreeVisible, impl_layoutBoundsChanged, impl_markDirty, impl_notifyLayoutBoundsChanged, impl_pickNode, impl_pickNodeLocal, impl_processCSS, impl_processCSS, impl_reapplyCSS, impl_setShowMnemonics, impl_setStyleMap, impl_showMnemonicsProperty, impl_syncPeer, impl_transformsChanged, impl_traverse, impl_treeVisibleProperty, 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, lookup, lookupAll, managedProperty, maxHeight, maxWidth, minHeight, minWidth, 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, prefHeight, prefWidth, pressedProperty, pseudoClassStateChanged, queryAccessibleAttribute, relocate, removeEventFilter, removeEventHandler, requestFocus, resize, 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, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, visiblePropertypublic Chart3DCanvas(Chart3D chart)
chart - the chart (null not permitted).public Chart3D getChart()
null).public void setChart(Chart3D chart)
chart - the chart (null not permitted).public double getMargin()
public void setMargin(double margin)
zoomToFit(double, double)).margin - the margin.public RenderingInfo getRenderingInfo()
null).public double getMinViewingDistance()
public void setMinViewingDistance(double minViewingDistance)
minViewingDistance - the minimum viewing distance.public double getMaxViewingDistanceMultiplier()
public void setMaxViewingDistanceMultiplier(double multiplier)
multiplier - the multiplier (must be > 1.0).public double getPanIncrement()
Math.PI / 120.0.public void setPanIncrement(double increment)
increment - the angle in radians.public double getRotateIncrement()
Math.PI / 120.0.public void setRotateIncrement(double increment)
increment - the angle in radians.public boolean isTooltipEnabled()
public void setTooltipEnabled(boolean tooltipEnabled)
tooltipEnabled - the new flag value.public boolean isRotateViewEnabled()
public void setRotateViewEnabled(boolean enabled)
enabled - the new flag value.public void zoomToFit(double width, double height)
getMargin()) around the edges to
leave room for labels etc.width - the width.height - the height.public void draw()
renderingInfo attribute with the latest rendering
information.public boolean isResizable()
true to indicate the canvas is resizable.isResizable in class javafx.scene.Nodetrue.protected void updateTooltip(javafx.scene.input.MouseEvent me)
tooltipEnabled flag is set to false.me - the mouse event.public void chartChanged(Chart3DChangeEvent event)
Chart3DChangeListenerchartChanged in interface Chart3DChangeListenerevent - the event.