- java.lang.Object
-
- javafx.scene.Node
-
- javafx.scene.Parent
-
- javafx.scene.layout.Region
-
- eu.hansolo.tilesfx.chart.SunburstChart
-
- All Implemented Interfaces:
javafx.css.Styleable,javafx.event.EventTarget
@DefaultProperty("children") public class SunburstChart extends javafx.scene.layout.RegionUser: hansolo Date: 29.10.17 Time: 09:50
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSunburstChart.TextOrientationstatic classSunburstChart.VisibleData
-
Constructor Summary
Constructors Constructor Description SunburstChart()SunburstChart(TreeNode TREE)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javafx.beans.property.BooleanPropertyautoTextColorProperty()javafx.beans.property.ObjectProperty<javafx.scene.paint.Color>backgroundColorProperty()javafx.beans.property.ObjectProperty<javafx.scene.paint.Color>brightTextColorProperty()protected doublecomputeMaxHeight(double WIDTH)protected doublecomputeMaxWidth(double HEIGHT)protected doublecomputeMinHeight(double WIDTH)protected doublecomputeMinWidth(double HEIGHT)protected doublecomputePrefHeight(double WIDTH)protected doublecomputePrefWidth(double HEIGHT)javafx.beans.property.ObjectProperty<javafx.scene.paint.Color>darkTextColorProperty()javafx.beans.property.IntegerPropertydecimalsProperty()voiddispose()javafx.scene.paint.ColorgetBackgroundColor()Returns the color that will be used to fill the background of the chartjavafx.scene.paint.ColorgetBrightTextColor()Returns the color that will be used by the autoTextColor feature as the bright text on dark segment fill colorsjavafx.collections.ObservableList<javafx.scene.Node>getChildren()javafx.scene.paint.ColorgetDarkTextColor()Returns the color that will be used by the autoTextColor feature as the dark text on bright segment fill colorsintgetDecimals()Returns the number of decimals that will be used to format the values in the tooltipdoublegetParentAngle(TreeNode<ChartData> NODE)javafx.scene.paint.ColorgetTextColor()Returns the color that will be used to draw text in segments if useChartDataTextColor == falseSunburstChart.TextOrientationgetTextOrientation()Returns the orientation the text will be drawn in the segmentsTreeNode<ChartData>getTreeNode()booleangetUseChartDataTextColor()Returns true if the text color of the ChartData elements should be used to fill the text in the segmentsbooleangetUseColorFromParent()Returns true if the color of all chart segments in one group should be filled with the color of the groups root node or by the color defined in the chart data elementsSunburstChart.VisibleDatagetVisibleData()Returns the data that should be visualized in the chart segmentsjavafx.beans.property.BooleanPropertyinteractiveProperty()booleanisAutoTextColor()Returns true if the text color of the chart data should be adjusted according to the chart data fill color.booleanisInteractive()Returns true if the chart is drawn using Path elements, fire ChartDataEvents and show tooltips on segments.voidlayoutChildren()voidredraw()voidsetAutoTextColor(boolean AUTOMATIC)Defines if the text color of the chart data should be adjusted according to the chart data fill colorvoidsetBackgroundColor(javafx.scene.paint.Color COLOR)Defines the color that will be used to fill the background of the chartvoidsetBrightTextColor(javafx.scene.paint.Color COLOR)Defines the color that will be used by the autoTextColor feature as the bright text on dark segment fill colorsvoidsetDarkTextColor(javafx.scene.paint.Color COLOR)Defines the color that will be used by the autoTextColor feature as the dark text on bright segment fill colorsvoidsetDecimals(int DECIMALS)Defines the number of decimals that will be used to format the values in the tooltipvoidsetInteractive(boolean INTERACTIVE)Defines if the chart should be drawn using Path elements, fire ChartDataEvents and shows tooltips on segments or if the the chart should be drawn using one Canvas node.voidsetTextColor(javafx.scene.paint.Color COLOR)Defines the color that will be used to draw text in segments if useChartDataTextColor == falsevoidsetTextOrientation(SunburstChart.TextOrientation ORIENTATION)Defines the orientation the text will be drawn in the segmentsvoidsetTree(TreeNode<ChartData> TREE)Defines the root element of the treevoidsetUseChartDataTextColor(boolean USE)Defines if the text color of the segments should be taken from the ChartData elementsvoidsetUseColorFromParent(boolean USE)Defines if tthe color of all chart segments in one group should be filled with the color of the groups root node or by the color defined in the chart data elementsvoidsetVisibleData(SunburstChart.VisibleData VISIBLE_DATA)Defines the data that should be visualized in the chart segmentsjavafx.beans.property.ObjectProperty<javafx.scene.paint.Color>textColorProperty()javafx.beans.property.ObjectProperty<SunburstChart.TextOrientation>textOrientationProperty()javafx.beans.property.ObjectProperty<TreeNode<ChartData>>treeNodeProperty()javafx.beans.property.BooleanPropertyuseChartDataTextColor()javafx.beans.property.BooleanPropertyuseColorFromParentProperty()javafx.beans.property.ObjectProperty<SunburstChart.VisibleData>visibleDataProperty()-
Methods inherited from class javafx.scene.layout.Region
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, getBackground, getBorder, getClassCssMetaData, getCssMetaData, 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, 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
-
-
-
-
Constructor Detail
-
SunburstChart
public SunburstChart()
-
SunburstChart
public SunburstChart(TreeNode TREE)
-
-
Method Detail
-
layoutChildren
public void layoutChildren()
- Overrides:
layoutChildrenin classjavafx.scene.Parent
-
computeMinWidth
protected double computeMinWidth(double HEIGHT)
- Overrides:
computeMinWidthin classjavafx.scene.layout.Region
-
computeMinHeight
protected double computeMinHeight(double WIDTH)
- Overrides:
computeMinHeightin classjavafx.scene.layout.Region
-
computePrefWidth
protected double computePrefWidth(double HEIGHT)
- Overrides:
computePrefWidthin classjavafx.scene.layout.Region
-
computePrefHeight
protected double computePrefHeight(double WIDTH)
- Overrides:
computePrefHeightin classjavafx.scene.layout.Region
-
computeMaxWidth
protected double computeMaxWidth(double HEIGHT)
- Overrides:
computeMaxWidthin classjavafx.scene.layout.Region
-
computeMaxHeight
protected double computeMaxHeight(double WIDTH)
- Overrides:
computeMaxHeightin classjavafx.scene.layout.Region
-
getChildren
public javafx.collections.ObservableList<javafx.scene.Node> getChildren()
- Overrides:
getChildrenin classjavafx.scene.Parent
-
dispose
public void dispose()
-
getVisibleData
public SunburstChart.VisibleData getVisibleData()
Returns the data that should be visualized in the chart segments- Returns:
- the data that should be visualized in the chart segments
-
setVisibleData
public void setVisibleData(SunburstChart.VisibleData VISIBLE_DATA)
Defines the data that should be visualized in the chart segments- Parameters:
VISIBLE_DATA-
-
visibleDataProperty
public javafx.beans.property.ObjectProperty<SunburstChart.VisibleData> visibleDataProperty()
-
getTextOrientation
public SunburstChart.TextOrientation getTextOrientation()
Returns the orientation the text will be drawn in the segments- Returns:
- the orientation the text will be drawn in the segments
-
setTextOrientation
public void setTextOrientation(SunburstChart.TextOrientation ORIENTATION)
Defines the orientation the text will be drawn in the segments- Parameters:
ORIENTATION-
-
textOrientationProperty
public javafx.beans.property.ObjectProperty<SunburstChart.TextOrientation> textOrientationProperty()
-
getBackgroundColor
public javafx.scene.paint.Color getBackgroundColor()
Returns the color that will be used to fill the background of the chart- Returns:
- the color that will be used to fill the background of the chart
-
setBackgroundColor
public void setBackgroundColor(javafx.scene.paint.Color COLOR)
Defines the color that will be used to fill the background of the chart- Parameters:
COLOR-
-
backgroundColorProperty
public javafx.beans.property.ObjectProperty<javafx.scene.paint.Color> backgroundColorProperty()
-
getTextColor
public javafx.scene.paint.Color getTextColor()
Returns the color that will be used to draw text in segments if useChartDataTextColor == false- Returns:
- the color that will be used to draw text in segments if useChartDataTextColor == false
-
setTextColor
public void setTextColor(javafx.scene.paint.Color COLOR)
Defines the color that will be used to draw text in segments if useChartDataTextColor == false- Parameters:
COLOR-
-
textColorProperty
public javafx.beans.property.ObjectProperty<javafx.scene.paint.Color> textColorProperty()
-
getUseColorFromParent
public boolean getUseColorFromParent()
Returns true if the color of all chart segments in one group should be filled with the color of the groups root node or by the color defined in the chart data elements- Returns:
-
setUseColorFromParent
public void setUseColorFromParent(boolean USE)
Defines if tthe color of all chart segments in one group should be filled with the color of the groups root node or by the color defined in the chart data elements- Parameters:
USE-
-
useColorFromParentProperty
public javafx.beans.property.BooleanProperty useColorFromParentProperty()
-
getDecimals
public int getDecimals()
Returns the number of decimals that will be used to format the values in the tooltip- Returns:
-
setDecimals
public void setDecimals(int DECIMALS)
Defines the number of decimals that will be used to format the values in the tooltip- Parameters:
DECIMALS-
-
decimalsProperty
public javafx.beans.property.IntegerProperty decimalsProperty()
-
isInteractive
public boolean isInteractive()
Returns true if the chart is drawn using Path elements, fire ChartDataEvents and show tooltips on segments.- Returns:
-
setInteractive
public void setInteractive(boolean INTERACTIVE)
Defines if the chart should be drawn using Path elements, fire ChartDataEvents and shows tooltips on segments or if the the chart should be drawn using one Canvas node.- Parameters:
INTERACTIVE-
-
interactiveProperty
public javafx.beans.property.BooleanProperty interactiveProperty()
-
isAutoTextColor
public boolean isAutoTextColor()
Returns true if the text color of the chart data should be adjusted according to the chart data fill color. e.g. if the fill color is dark the text will be set to the defined brightTextColor and vice versa.- Returns:
- true if the text color of the chart data should be adjusted according to the chart data fill color
-
setAutoTextColor
public void setAutoTextColor(boolean AUTOMATIC)
Defines if the text color of the chart data should be adjusted according to the chart data fill color- Parameters:
AUTOMATIC-
-
autoTextColorProperty
public javafx.beans.property.BooleanProperty autoTextColorProperty()
-
getBrightTextColor
public javafx.scene.paint.Color getBrightTextColor()
Returns the color that will be used by the autoTextColor feature as the bright text on dark segment fill colors- Returns:
- the color that will be used by the autoTextColor feature as the bright text on dark segment fill colors
-
setBrightTextColor
public void setBrightTextColor(javafx.scene.paint.Color COLOR)
Defines the color that will be used by the autoTextColor feature as the bright text on dark segment fill colors- Parameters:
COLOR-
-
brightTextColorProperty
public javafx.beans.property.ObjectProperty<javafx.scene.paint.Color> brightTextColorProperty()
-
getDarkTextColor
public javafx.scene.paint.Color getDarkTextColor()
Returns the color that will be used by the autoTextColor feature as the dark text on bright segment fill colors- Returns:
- the color that will be used by the autoTextColor feature as the dark text on bright segment fill colors
-
setDarkTextColor
public void setDarkTextColor(javafx.scene.paint.Color COLOR)
Defines the color that will be used by the autoTextColor feature as the dark text on bright segment fill colors- Parameters:
COLOR-
-
darkTextColorProperty
public javafx.beans.property.ObjectProperty<javafx.scene.paint.Color> darkTextColorProperty()
-
getUseChartDataTextColor
public boolean getUseChartDataTextColor()
Returns true if the text color of the ChartData elements should be used to fill the text in the segments- Returns:
- true if the text color of the segments will be taken from the ChartData elements
-
setUseChartDataTextColor
public void setUseChartDataTextColor(boolean USE)
Defines if the text color of the segments should be taken from the ChartData elements- Parameters:
USE-
-
useChartDataTextColor
public javafx.beans.property.BooleanProperty useChartDataTextColor()
-
setTree
public void setTree(TreeNode<ChartData> TREE)
Defines the root element of the tree- Parameters:
TREE-
-
treeNodeProperty
public javafx.beans.property.ObjectProperty<TreeNode<ChartData>> treeNodeProperty()
-
redraw
public void redraw()
-
-