java.lang.Object
javafx.scene.Node
javafx.scene.Parent
javafx.scene.layout.Region
eu.hansolo.fx.charts.SunburstChart<T>
- All Implemented Interfaces:
javafx.css.Styleable,javafx.event.EventTarget
@DefaultProperty("children")
public class SunburstChart<T extends ChartItem>
extends javafx.scene.layout.Region
-
Property Summary
PropertiesTypePropertyDescriptionjavafx.beans.property.BooleanPropertyjavafx.beans.property.ObjectProperty<javafx.scene.paint.Color>javafx.beans.property.ObjectProperty<javafx.scene.paint.Color>javafx.beans.property.ObjectProperty<javafx.scene.paint.Color>javafx.beans.property.IntegerPropertyjavafx.beans.property.BooleanPropertyjavafx.beans.property.ObjectProperty<javafx.scene.paint.Color>javafx.beans.property.ObjectProperty<TextOrientation>javafx.beans.property.BooleanPropertyjavafx.beans.property.ObjectProperty<VisibleData>Properties inherited from class javafx.scene.layout.Region
background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, widthProperties inherited from class javafx.scene.Parent
needsLayoutProperties inherited from class javafx.scene.Node
accessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, focusVisible, focusWithin, hover, id, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, nodeOrientation, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onInputMethodTextChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragEntered, onMouseDragExited, onMouseDragged, onMouseDragOver, onMouseDragReleased, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onRotate, onRotationFinished, onRotationStarted, onScrollFinished, onScroll, onScrollStarted, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, onZoomFinished, onZoom, onZoomStarted, opacity, parent, pickOnBounds, pressed, rotate, rotationAxis, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, translateZ, viewOrder, visible -
Field Summary
Fields inherited from class javafx.scene.layout.Region
USE_COMPUTED_SIZE, USE_PREF_SIZEFields inherited from class javafx.scene.Node
BASELINE_OFFSET_SAME_AS_HEIGHT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjavafx.beans.property.BooleanPropertyjavafx.beans.property.ObjectProperty<javafx.scene.paint.Color>javafx.beans.property.ObjectProperty<javafx.scene.paint.Color>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>javafx.beans.property.IntegerPropertyvoiddispose()javafx.scene.paint.ColorReturns the color that will be used to fill the background of the chartjavafx.scene.paint.ColorReturns the color that will be used by the autoTextColor feature as the bright text on dark segment fill colorsjavafx.collections.ObservableList<javafx.scene.Node>javafx.scene.paint.ColorReturns the color that will be used by the autoTextColor feature as the dark text on bright segment fill colorsintReturns the number of decimals that will be used to format the values in the tooltipjavafx.scene.paint.ColorReturns the color that will be used to draw text in segments if useChartItemTextColor == falseReturns the orientation the text will be drawn in the segmentsbooleanReturns true if the text color of the ChartItem elements should be used to fill the text in the segmentsbooleanReturns 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 elementsReturns the data that should be visualized in the chart segmentsjavafx.beans.property.BooleanPropertybooleanReturns true if the text color of the chart data should be adjusted according to the chart data fill color.booleanReturns true if the chart is drawn using Path elements, fire ChartItemEvents and show tooltips on segments.voidvoidsetAutoTextColor(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 ChartItemEvents 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 useChartItemTextColor == falsevoidsetTextOrientation(TextOrientation ORIENTATION) Defines the orientation the text will be drawn in the segmentsvoidDefines the root element of the treevoidsetUseChartItemTextColor(boolean USE) Defines if the text color of the segments should be taken from the ChartItem 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(VisibleData VISIBLE_DATA) Defines the data that should be visualized in the chart segmentsjavafx.beans.property.ObjectProperty<javafx.scene.paint.Color>javafx.beans.property.ObjectProperty<TextOrientation>javafx.beans.property.BooleanPropertyjavafx.beans.property.BooleanPropertyjavafx.beans.property.ObjectProperty<VisibleData>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, widthPropertyMethods inherited from class javafx.scene.Parent
getBaselineOffset, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, queryAccessibleAttribute, requestLayout, requestParentLayout, setNeedsLayout, updateBoundsMethods 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, focusVisibleProperty, focusWithinProperty, 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, isFocusVisible, isFocusWithin, 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, visiblePropertyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface javafx.css.Styleable
getStyleableNode
-
Property Details
-
visibleData
- See Also:
-
textOrientation
-
backgroundColor
public javafx.beans.property.ObjectProperty<javafx.scene.paint.Color> backgroundColorProperty -
textColor
public javafx.beans.property.ObjectProperty<javafx.scene.paint.Color> textColorProperty- See Also:
-
useColorFromParent
public javafx.beans.property.BooleanProperty useColorFromParentProperty -
decimals
public javafx.beans.property.IntegerProperty decimalsProperty- See Also:
-
interactive
public javafx.beans.property.BooleanProperty interactiveProperty- See Also:
-
autoTextColor
public javafx.beans.property.BooleanProperty autoTextColorProperty- See Also:
-
brightTextColor
public javafx.beans.property.ObjectProperty<javafx.scene.paint.Color> brightTextColorProperty -
darkTextColor
public javafx.beans.property.ObjectProperty<javafx.scene.paint.Color> darkTextColorProperty- See Also:
-
-
Constructor Details
-
SunburstChart
public SunburstChart() -
SunburstChart
-
-
Method Details
-
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
Returns the data that should be visualized in the chart segments- Returns:
- the data that should be visualized in the chart segments
-
setVisibleData
Defines the data that should be visualized in the chart segments- Parameters:
VISIBLE_DATA-
-
visibleDataProperty
- See Also:
-
getTextOrientation
Returns the orientation the text will be drawn in the segments- Returns:
- the orientation the text will be drawn in the segments
-
setTextOrientation
Defines the orientation the text will be drawn in the segments- Parameters:
ORIENTATION-
-
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 useChartItemTextColor == false- Returns:
- the color that will be used to draw text in segments if useChartItemTextColor == false
-
setTextColor
public void setTextColor(javafx.scene.paint.Color COLOR) Defines the color that will be used to draw text in segments if useChartItemTextColor == false- Parameters:
COLOR-
-
textColorProperty
public javafx.beans.property.ObjectProperty<javafx.scene.paint.Color> textColorProperty()- See Also:
-
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()- See Also:
-
isInteractive
public boolean isInteractive()Returns true if the chart is drawn using Path elements, fire ChartItemEvents and show tooltips on segments.- Returns:
-
setInteractive
public void setInteractive(boolean INTERACTIVE) Defines if the chart should be drawn using Path elements, fire ChartItemEvents 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()- See Also:
-
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()- See Also:
-
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()- See Also:
-
getUseChartItemTextColor
public boolean getUseChartItemTextColor()Returns true if the text color of the ChartItem 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 ChartItem elements
-
setUseChartItemTextColor
public void setUseChartItemTextColor(boolean USE) Defines if the text color of the segments should be taken from the ChartItem elements- Parameters:
USE-
-
useChartItemTextColor
public javafx.beans.property.BooleanProperty useChartItemTextColor() -
setTree
Defines the root element of the tree- Parameters:
TREE-
-