Class SunburstChart

  • All Implemented Interfaces:
    javafx.css.Styleable, javafx.event.EventTarget

    @DefaultProperty("children")
    public class SunburstChart
    extends javafx.scene.layout.Region
    User: hansolo Date: 29.10.17 Time: 09:50
    • Field Summary

      • Fields inherited from class javafx.scene.layout.Region

        USE_COMPUTED_SIZE, USE_PREF_SIZE
      • Fields inherited from class javafx.scene.Node

        BASELINE_OFFSET_SAME_AS_HEIGHT
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javafx.beans.property.BooleanProperty autoTextColorProperty()  
      javafx.beans.property.ObjectProperty<javafx.scene.paint.Color> backgroundColorProperty()  
      javafx.beans.property.ObjectProperty<javafx.scene.paint.Color> brightTextColorProperty()  
      protected double computeMaxHeight​(double WIDTH)  
      protected double computeMaxWidth​(double HEIGHT)  
      protected double computeMinHeight​(double WIDTH)  
      protected double computeMinWidth​(double HEIGHT)  
      protected double computePrefHeight​(double WIDTH)  
      protected double computePrefWidth​(double HEIGHT)  
      javafx.beans.property.ObjectProperty<javafx.scene.paint.Color> darkTextColorProperty()  
      javafx.beans.property.IntegerProperty decimalsProperty()  
      void dispose()  
      javafx.scene.paint.Color getBackgroundColor()
      Returns the color that will be used to fill the background of the chart
      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
      javafx.collections.ObservableList<javafx.scene.Node> getChildren()  
      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
      int getDecimals()
      Returns the number of decimals that will be used to format the values in the tooltip
      double getParentAngle​(TreeNode<ChartData> NODE)  
      javafx.scene.paint.Color getTextColor()
      Returns the color that will be used to draw text in segments if useChartDataTextColor == false
      SunburstChart.TextOrientation getTextOrientation()
      Returns the orientation the text will be drawn in the segments
      TreeNode<ChartData> getTreeNode()  
      boolean getUseChartDataTextColor()
      Returns true if the text color of the ChartData elements should be used to fill the text in the segments
      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
      SunburstChart.VisibleData getVisibleData()
      Returns the data that should be visualized in the chart segments
      javafx.beans.property.BooleanProperty interactiveProperty()  
      boolean isAutoTextColor()
      Returns true if the text color of the chart data should be adjusted according to the chart data fill color.
      boolean isInteractive()
      Returns true if the chart is drawn using Path elements, fire ChartDataEvents and show tooltips on segments.
      void layoutChildren()  
      void redraw()  
      void setAutoTextColor​(boolean AUTOMATIC)
      Defines if the text color of the chart data should be adjusted according to the chart data fill color
      void setBackgroundColor​(javafx.scene.paint.Color COLOR)
      Defines the color that will be used to fill the background of the chart
      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
      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
      void setDecimals​(int DECIMALS)
      Defines the number of decimals that will be used to format the values in the tooltip
      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.
      void setTextColor​(javafx.scene.paint.Color COLOR)
      Defines the color that will be used to draw text in segments if useChartDataTextColor == false
      void setTextOrientation​(SunburstChart.TextOrientation ORIENTATION)
      Defines the orientation the text will be drawn in the segments
      void setTree​(TreeNode<ChartData> TREE)
      Defines the root element of the tree
      void setUseChartDataTextColor​(boolean USE)
      Defines if the text color of the segments should be taken from the ChartData elements
      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
      void setVisibleData​(SunburstChart.VisibleData VISIBLE_DATA)
      Defines the data that should be visualized in the chart segments
      javafx.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.BooleanProperty useChartDataTextColor()  
      javafx.beans.property.BooleanProperty useColorFromParentProperty()  
      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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface javafx.css.Styleable

        getStyleableNode
    • Constructor Detail

      • SunburstChart

        public SunburstChart()
      • SunburstChart

        public SunburstChart​(TreeNode TREE)
    • Method Detail

      • layoutChildren

        public void layoutChildren()
        Overrides:
        layoutChildren in class javafx.scene.Parent
      • computeMinWidth

        protected double computeMinWidth​(double HEIGHT)
        Overrides:
        computeMinWidth in class javafx.scene.layout.Region
      • computeMinHeight

        protected double computeMinHeight​(double WIDTH)
        Overrides:
        computeMinHeight in class javafx.scene.layout.Region
      • computePrefWidth

        protected double computePrefWidth​(double HEIGHT)
        Overrides:
        computePrefWidth in class javafx.scene.layout.Region
      • computePrefHeight

        protected double computePrefHeight​(double WIDTH)
        Overrides:
        computePrefHeight in class javafx.scene.layout.Region
      • computeMaxWidth

        protected double computeMaxWidth​(double HEIGHT)
        Overrides:
        computeMaxWidth in class javafx.scene.layout.Region
      • computeMaxHeight

        protected double computeMaxHeight​(double WIDTH)
        Overrides:
        computeMaxHeight in class javafx.scene.layout.Region
      • getChildren

        public javafx.collections.ObservableList<javafx.scene.Node> getChildren()
        Overrides:
        getChildren in class javafx.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 -
      • 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 -
      • 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()