Class CircularPane
java.lang.Object
javafx.scene.Node
javafx.scene.Parent
javafx.scene.layout.Region
javafx.scene.layout.Pane
jfxtras.scene.layout.CircularPane
- All Implemented Interfaces:
javafx.css.Styleable, javafx.event.EventTarget
public class CircularPane
extends javafx.scene.layout.Pane
This pane lays it children out in a circle or part of a circle (arc).
In order to understand how to use this pane, it is important to understand how it places its children.
Placing nodes on a circle in essence is not that difficult; a circle is 360 degrees, so each node is spaced 360 / n degrees apart, the real challenge is to determine how large the circle must be.
Nodes in JavaFX are rectangles with a width and a height, but for calculating in a circle the rectangular shape is impractical.
So CircularPane treats its child nodes as circles, or for better visualization: as beads on a chain.
The first step is to determine how large a single bead is. This already is an interesting question.
A beat should encompass the contents of the node, but CircularPane does not know what exactly is drawn in the node.
It could be a simple flat or vertical line, where the encompassing circle's diameter is equal to the width or height (whichever is the largest).
But if the contents is an X or a rectangle, then then encompassing circle's diameter is equal to the diagonal.
Since CircularPane does not know, it has to assume the worst and use the diagonal.
But the childrenAreCircles property allows the user to inform CircularPane than all the children are circular (or smaller), so it can then use the width or height to calculate the encompassing circle (bead).
CircularPane segments the 360 degrees in equal parts; 360 / number of children.
The largest bead determines the distance from the origin to where it fits in a segment, and this determines the size of the chain.
By setting a debug color, the beads will be drawn and will clarify the layout.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceclassThis class holds additional layout information for animation.private classprivate classclassThis class holds layout information at pane levelprotected static enumclassThis class holds layout information at node level -
Property Summary
PropertiesTypePropertyDescriptionjavafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.event.ActionEvent>> animateInFinishedjavafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.event.ActionEvent>> animateOutFinishedfinal javafx.beans.property.ReadOnlyBooleanPropertyanimatingInfinal javafx.beans.property.ReadOnlyBooleanPropertyanimatingOutfinal javafx.beans.property.ReadOnlyBooleanPropertyanimatingjavafx.beans.property.ObjectProperty<javafx.util.Duration> animationDurationjavafx.beans.property.ObjectProperty<CircularPane.AnimationInterpolation> animationInterpolation: calculate the position of a node during the animation (default: move from origin), use node.relocate to position node (or manually apply layoutBounds.minX/Y)javafx.beans.property.ObjectProperty<Double> arc in degrees: the arc is used to determine the end position; default = 360 = north (top)javafx.beans.property.ObjectProperty<Boolean> childrenAreCircular: if all children are circular, then we can use a different sizejavafx.beans.property.ObjectProperty<Boolean> clipAwayExcessWhitespace: cut away excess whitespace on the outsidejavafx.beans.property.ObjectProperty<Double> diameter: diameter of the whole layoutjavafx.beans.property.ObjectProperty<Double> gap: space between nodesjavafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> debug: show debug hintsjavafx.beans.property.ObjectProperty<Double> StartAngle in degrees: the startAngle is used to determine the starting position; default = 0 = north (top)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, 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
FieldsModifier and TypeFieldDescriptionprivate final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.event.ActionEvent>> private final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.event.ActionEvent>> private javafx.beans.property.ReadOnlyBooleanWrapperprivate javafx.beans.property.ReadOnlyBooleanWrapperprivate javafx.beans.property.ReadOnlyBooleanWrapperprivate final javafx.beans.property.ObjectProperty<javafx.util.Duration> private final javafx.beans.property.ObjectProperty<CircularPane.AnimationInterpolation> (package private) final Map<javafx.scene.Node, CircularPane.AnimationLayoutInfo> private final javafx.beans.property.ObjectProperty<Double> private final Map<CircularPane.MinPrefMax, CircularPane.LayoutInfo> private final javafx.beans.property.ObjectProperty<Boolean> private final javafx.beans.property.ObjectProperty<Boolean> private final javafx.beans.property.ObjectProperty<Double> private final javafx.beans.property.ObjectProperty<Double> private booleanprivate final AtomicIntegerprivate final Map<javafx.scene.Node, CircularPane.Bead> private final Map<javafx.scene.Node, CircularPane.Connector> private final javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> private final javafx.beans.property.ObjectProperty<Double> (package private) javafx.animation.TransitionFields 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 TypeMethodDescriptionadd(javafx.scene.Node node) protected voidanimate(double rate) static voidanimateAppear(double progress, CircularPane.AnimationLayoutInfo animationLayoutInfo) static voidanimateFromTheOrigin(double progress, CircularPane.AnimationLayoutInfo animationLayoutInfo) static voidanimateFromTheOriginWithFadeRotate(double progress, CircularPane.AnimationLayoutInfo animationLayoutInfo) voidjavafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.event.ActionEvent>> animateInFinishedvoidjavafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.event.ActionEvent>> animateOutFinishedstatic voidanimateOverTheArc(double progress, CircularPane.AnimationLayoutInfo animationLayoutInfo) static voidanimateOverTheArcWithFade(double progress, CircularPane.AnimationLayoutInfo animationLayoutInfo) static voidanimateSpiralOut(double progress, CircularPane.AnimationLayoutInfo animationLayoutInfo) final javafx.beans.property.ReadOnlyBooleanPropertyanimatingInfinal javafx.beans.property.ReadOnlyBooleanPropertyanimatingOutfinal javafx.beans.property.ReadOnlyBooleanPropertyanimatingjavafx.beans.property.ObjectProperty<javafx.util.Duration> animationDurationjavafx.beans.property.ObjectProperty<CircularPane.AnimationInterpolation> animationInterpolation: calculate the position of a node during the animation (default: move from origin), use node.relocate to position node (or manually apply layoutBounds.minX/Y)javafx.beans.property.ObjectProperty<Double> arc in degrees: the arc is used to determine the end position; default = 360 = north (top)protected CircularPane.LayoutInfoprivate doublecalculateNodeHeight(javafx.scene.Node n, CircularPane.MinPrefMax size) private doublecalculateNodeWidth(javafx.scene.Node n, CircularPane.MinPrefMax size) private static doublecalculateX(double chainDiameter, double angle) private static doublecalculateY(double chainDiameter, double angle) javafx.beans.property.ObjectProperty<Boolean> childrenAreCircular: if all children are circular, then we can use a different sizejavafx.beans.property.ObjectProperty<Boolean> clipAwayExcessWhitespace: cut away excess whitespace on the outsideprotected doublecomputeChainDiameter(double beadDiameter) The chain is the circle that runs through the bead's centersprotected doublecomputeMaxHeight(double width) protected doublecomputeMaxWidth(double height) protected doublecomputeMinHeight(double width) protected doublecomputeMinWidth(double height) protected doublecomputePrefHeight(double width) protected doublecomputePrefWidth(double height) private static doubledegreesToRadials(double d) protected doubleprivate doubleprivate doublejavafx.beans.property.ObjectProperty<Double> diameter: diameter of the whole layoutjavafx.beans.property.ObjectProperty<Double> gap: space between nodesjavafx.util.DurationGets the value of theanimationDurationproperty.Gets the value of theanimationInterpolationproperty.getArc()Gets the value of thearcproperty.Gets the value of thechildrenAreCircularproperty.Gets the value of theclipAwayExcessWhitespaceproperty.Gets the value of thediameterproperty.getGap()Gets the value of thegapproperty.private List<javafx.scene.Node> javafx.event.EventHandler<javafx.event.ActionEvent> javafx.event.EventHandler<javafx.event.ActionEvent> javafx.scene.paint.PaintGets the value of theshowDebugproperty.Gets the value of thestartAngleproperty.private Doublefinal booleanGets the value of theanimatingproperty.final booleanGets the value of theanimatingInproperty.final booleanGets the value of theanimatingOutproperty.protected voidremove(javafx.scene.Node node) voidprivate voidsetAnimating(boolean value) private voidsetAnimatingIn(boolean value) private voidsetAnimatingOut(boolean value) voidsetAnimationDuration(javafx.util.Duration value) Sets the value of theanimationDurationproperty.voidSets the value of theanimationInterpolationproperty.voidSets the value of thearcproperty.voidsetChildrenAreCircular(Boolean value) Sets the value of thechildrenAreCircularproperty.voidSets the value of theclipAwayExcessWhitespaceproperty.voidsetDiameter(Double value) Sets the value of thediameterproperty.voidSets the value of thegapproperty.voidsetOnAnimateInFinished(javafx.event.EventHandler<javafx.event.ActionEvent> value) voidsetOnAnimateOutFinished(javafx.event.EventHandler<javafx.event.ActionEvent> value) voidsetShowDebug(javafx.scene.paint.Paint value) Sets the value of theshowDebugproperty.voidsetStartAngle(Double value) Sets the value of thestartAngleproperty.javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> debug: show debug hintsjavafx.beans.property.ObjectProperty<Double> StartAngle in degrees: the startAngle is used to determine the starting position; default = 0 = north (top)withAnimationDuration(javafx.util.Duration value) withChildrenAreCircular(Boolean value) withDiameter(Double value) IdwithOnAnimateOutFinished(javafx.event.EventHandler<javafx.event.ActionEvent> value) withShowDebug(javafx.scene.paint.Paint value) withStartAngle(Double value) witOnhAnimateInFinished(javafx.event.EventHandler<javafx.event.ActionEvent> value) Methods inherited from class javafx.scene.layout.Pane
getChildrenMethods 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, 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, 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, visiblePropertyMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface javafx.css.Styleable
getStyleableNode
-
Property Details
-
startAngle
StartAngle in degrees: the startAngle is used to determine the starting position; default = 0 = north (top)- See Also:
-
arc
arc in degrees: the arc is used to determine the end position; default = 360 = north (top)- See Also:
-
gap
-
diameter
diameter: diameter of the whole layout- See Also:
-
childrenAreCircular
childrenAreCircular: if all children are circular, then we can use a different size- See Also:
-
clipAwayExcessWhitespace
clipAwayExcessWhitespace: cut away excess whitespace on the outside- See Also:
-
animationDuration
public javafx.beans.property.ObjectProperty<javafx.util.Duration> animationDurationPropertyanimationDuration- See Also:
-
animationInterpolation
public javafx.beans.property.ObjectProperty<CircularPane.AnimationInterpolation> animationInterpolationPropertyanimationInterpolation: calculate the position of a node during the animation (default: move from origin), use node.relocate to position node (or manually apply layoutBounds.minX/Y)- See Also:
-
animating
public final javafx.beans.property.ReadOnlyBooleanProperty animatingPropertyanimating- See Also:
-
animatingIn
public final javafx.beans.property.ReadOnlyBooleanProperty animatingInPropertyanimatingIn- See Also:
-
animatingOut
public final javafx.beans.property.ReadOnlyBooleanProperty animatingOutPropertyanimatingOut- See Also:
-
animateInFinished
public javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.event.ActionEvent>> animateInFinishedPropertyanimateInFinished- See Also:
-
animateOutFinished
public javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.event.ActionEvent>> animateOutFinishedPropertyanimateOutFinished- See Also:
-
showDebug
public javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> showDebugPropertydebug: show debug hints- See Also:
-
-
Field Details
-
startAngleObjectProperty
-
arcObjectProperty
-
gapObjectProperty
-
diameterObjectProperty
-
childrenAreCircularObjectProperty
-
clipAwayExcessWhitespaceObjectProperty
-
animationDurationObjectProperty
private final javafx.beans.property.ObjectProperty<javafx.util.Duration> animationDurationObjectProperty -
animationInterpolationObjectProperty
private final javafx.beans.property.ObjectProperty<CircularPane.AnimationInterpolation> animationInterpolationObjectProperty -
animating
private javafx.beans.property.ReadOnlyBooleanWrapper animating -
animatingIn
private javafx.beans.property.ReadOnlyBooleanWrapper animatingIn -
animatingOut
private javafx.beans.property.ReadOnlyBooleanWrapper animatingOut -
animateInFinishedObjectProperty
private final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.event.ActionEvent>> animateInFinishedObjectProperty -
animateOutFinishedObjectProperty
private final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.event.ActionEvent>> animateOutFinishedObjectProperty -
showDebugObjectProperty
private final javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> showDebugObjectProperty -
layingoutChildren
-
initial
private boolean initial -
nodeToBeadMap
-
nodeToConnectorMap
-
calculateLayoutCache
-
transition
javafx.animation.Transition transition -
animationLayoutInfos
-
-
Constructor Details
-
CircularPane
public CircularPane()
-
-
Method Details
-
withId
Id -
startAngleProperty
StartAngle in degrees: the startAngle is used to determine the starting position; default = 0 = north (top)- Returns:
- the
startAngleproperty - See Also:
-
getStartAngle
Gets the value of thestartAngleproperty.- Property description:
- StartAngle in degrees: the startAngle is used to determine the starting position; default = 0 = north (top)
- Returns:
- the value of the
startAngleproperty - See Also:
-
setStartAngle
Sets the value of thestartAngleproperty.- Property description:
- StartAngle in degrees: the startAngle is used to determine the starting position; default = 0 = north (top)
- Parameters:
value- the value for thestartAngleproperty- See Also:
-
withStartAngle
-
getStartAngle360
-
arcProperty
arc in degrees: the arc is used to determine the end position; default = 360 = north (top)- Returns:
- the
arcproperty - See Also:
-
getArc
Gets the value of thearcproperty.- Property description:
- arc in degrees: the arc is used to determine the end position; default = 360 = north (top)
- Returns:
- the value of the
arcproperty - See Also:
-
setArc
Sets the value of thearcproperty.- Property description:
- arc in degrees: the arc is used to determine the end position; default = 360 = north (top)
- Parameters:
value- the value for thearcproperty- See Also:
-
withArc
-
gapProperty
gap: space between nodes- Returns:
- the
gapproperty - See Also:
-
getGap
Gets the value of thegapproperty.- Property description:
- gap: space between nodes
- Returns:
- the value of the
gapproperty - See Also:
-
setGap
Sets the value of thegapproperty.- Property description:
- gap: space between nodes
- Parameters:
value- the value for thegapproperty- See Also:
-
withGap
-
diameterProperty
diameter: diameter of the whole layout- Returns:
- the
diameterproperty - See Also:
-
getDiameter
Gets the value of thediameterproperty.- Property description:
- diameter: diameter of the whole layout
- Returns:
- the value of the
diameterproperty - See Also:
-
setDiameter
Sets the value of thediameterproperty.- Property description:
- diameter: diameter of the whole layout
- Parameters:
value- the value for thediameterproperty- See Also:
-
withDiameter
-
childrenAreCircularProperty
childrenAreCircular: if all children are circular, then we can use a different size- Returns:
- the
childrenAreCircularproperty - See Also:
-
getChildrenAreCircular
Gets the value of thechildrenAreCircularproperty.- Property description:
- childrenAreCircular: if all children are circular, then we can use a different size
- Returns:
- the value of the
childrenAreCircularproperty - See Also:
-
setChildrenAreCircular
Sets the value of thechildrenAreCircularproperty.- Property description:
- childrenAreCircular: if all children are circular, then we can use a different size
- Parameters:
value- the value for thechildrenAreCircularproperty- See Also:
-
withChildrenAreCircular
-
clipAwayExcessWhitespaceProperty
clipAwayExcessWhitespace: cut away excess whitespace on the outside- Returns:
- the
clipAwayExcessWhitespaceproperty - See Also:
-
getClipAwayExcessWhitespace
Gets the value of theclipAwayExcessWhitespaceproperty.- Property description:
- clipAwayExcessWhitespace: cut away excess whitespace on the outside
- Returns:
- the value of the
clipAwayExcessWhitespaceproperty - See Also:
-
setClipAwayExcessWhitespace
Sets the value of theclipAwayExcessWhitespaceproperty.- Property description:
- clipAwayExcessWhitespace: cut away excess whitespace on the outside
- Parameters:
value- the value for theclipAwayExcessWhitespaceproperty- See Also:
-
withClipAwayExcessWhitespace
-
animationDurationProperty
public javafx.beans.property.ObjectProperty<javafx.util.Duration> animationDurationProperty()animationDuration- Returns:
- the
animationDurationproperty - See Also:
-
getAnimationDuration
public javafx.util.Duration getAnimationDuration()Gets the value of theanimationDurationproperty.- Property description:
- animationDuration
- Returns:
- the value of the
animationDurationproperty - See Also:
-
setAnimationDuration
public void setAnimationDuration(javafx.util.Duration value) Sets the value of theanimationDurationproperty.- Property description:
- animationDuration
- Parameters:
value- the value for theanimationDurationproperty- See Also:
-
withAnimationDuration
-
animationInterpolationProperty
public javafx.beans.property.ObjectProperty<CircularPane.AnimationInterpolation> animationInterpolationProperty()animationInterpolation: calculate the position of a node during the animation (default: move from origin), use node.relocate to position node (or manually apply layoutBounds.minX/Y)- Returns:
- the
animationInterpolationproperty - See Also:
-
getAnimationInterpolation
Gets the value of theanimationInterpolationproperty.- Property description:
- animationInterpolation: calculate the position of a node during the animation (default: move from origin), use node.relocate to position node (or manually apply layoutBounds.minX/Y)
- Returns:
- the value of the
animationInterpolationproperty - See Also:
-
setAnimationInterpolation
Sets the value of theanimationInterpolationproperty.- Property description:
- animationInterpolation: calculate the position of a node during the animation (default: move from origin), use node.relocate to position node (or manually apply layoutBounds.minX/Y)
- Parameters:
value- the value for theanimationInterpolationproperty- See Also:
-
withAnimationInterpolation
-
animatingProperty
public final javafx.beans.property.ReadOnlyBooleanProperty animatingProperty()animating- Returns:
- the
animatingproperty - See Also:
-
setAnimating
private void setAnimating(boolean value) -
isAnimating
public final boolean isAnimating()Gets the value of theanimatingproperty.- Property description:
- animating
- Returns:
- the value of the
animatingproperty - See Also:
-
animatingInProperty
public final javafx.beans.property.ReadOnlyBooleanProperty animatingInProperty()animatingIn- Returns:
- the
animatingInproperty - See Also:
-
setAnimatingIn
private void setAnimatingIn(boolean value) -
isAnimatingIn
public final boolean isAnimatingIn()Gets the value of theanimatingInproperty.- Property description:
- animatingIn
- Returns:
- the value of the
animatingInproperty - See Also:
-
animatingOutProperty
public final javafx.beans.property.ReadOnlyBooleanProperty animatingOutProperty()animatingOut- Returns:
- the
animatingOutproperty - See Also:
-
setAnimatingOut
private void setAnimatingOut(boolean value) -
isAnimatingOut
public final boolean isAnimatingOut()Gets the value of theanimatingOutproperty.- Property description:
- animatingOut
- Returns:
- the value of the
animatingOutproperty - See Also:
-
animateInFinishedProperty
public javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.event.ActionEvent>> animateInFinishedProperty()animateInFinished- Returns:
- the
animateInFinishedproperty
-
getOnAnimateInFinished
public javafx.event.EventHandler<javafx.event.ActionEvent> getOnAnimateInFinished() -
setOnAnimateInFinished
public void setOnAnimateInFinished(javafx.event.EventHandler<javafx.event.ActionEvent> value) -
witOnhAnimateInFinished
public CircularPane witOnhAnimateInFinished(javafx.event.EventHandler<javafx.event.ActionEvent> value) -
animateOutFinishedProperty
public javafx.beans.property.ObjectProperty<javafx.event.EventHandler<javafx.event.ActionEvent>> animateOutFinishedProperty()animateOutFinished- Returns:
- the
animateOutFinishedproperty
-
getOnAnimateOutFinished
public javafx.event.EventHandler<javafx.event.ActionEvent> getOnAnimateOutFinished() -
setOnAnimateOutFinished
public void setOnAnimateOutFinished(javafx.event.EventHandler<javafx.event.ActionEvent> value) -
withOnAnimateOutFinished
public CircularPane withOnAnimateOutFinished(javafx.event.EventHandler<javafx.event.ActionEvent> value) -
showDebugProperty
public javafx.beans.property.ObjectProperty<javafx.scene.paint.Paint> showDebugProperty()debug: show debug hints- Returns:
- the
showDebugproperty - See Also:
-
getShowDebug
public javafx.scene.paint.Paint getShowDebug()Gets the value of theshowDebugproperty.- Property description:
- debug: show debug hints
- Returns:
- the value of the
showDebugproperty - See Also:
-
setShowDebug
public void setShowDebug(javafx.scene.paint.Paint value) Sets the value of theshowDebugproperty.- Property description:
- debug: show debug hints
- Parameters:
value- the value for theshowDebugproperty- See Also:
-
withShowDebug
-
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
-
layoutChildren
protected void layoutChildren()- Overrides:
layoutChildrenin classjavafx.scene.Parent
-
requestLayout
public void requestLayout()- Overrides:
requestLayoutin classjavafx.scene.Parent
-
calculateLayout
-
animateIn
public void animateIn() -
animateOut
public void animateOut() -
animate
protected void animate(double rate) -
animateFromTheOrigin
public static void animateFromTheOrigin(double progress, CircularPane.AnimationLayoutInfo animationLayoutInfo) - Parameters:
progress-animationLayoutInfo-
-
animateSpiralOut
public static void animateSpiralOut(double progress, CircularPane.AnimationLayoutInfo animationLayoutInfo) - Parameters:
progress-animationLayoutInfo-
-
animateFromTheOriginWithFadeRotate
public static void animateFromTheOriginWithFadeRotate(double progress, CircularPane.AnimationLayoutInfo animationLayoutInfo) - Parameters:
progress-animationLayoutInfo-
-
animateOverTheArc
public static void animateOverTheArc(double progress, CircularPane.AnimationLayoutInfo animationLayoutInfo) - Parameters:
progress-animationLayoutInfo-
-
animateOverTheArcWithFade
public static void animateOverTheArcWithFade(double progress, CircularPane.AnimationLayoutInfo animationLayoutInfo) - Parameters:
progress-animationLayoutInfo-
-
animateAppear
public static void animateAppear(double progress, CircularPane.AnimationLayoutInfo animationLayoutInfo) - Parameters:
progress-animationLayoutInfo-
-
add
-
remove
-
getManagedChildrenWithoutBeads
-
calculateX
private static double calculateX(double chainDiameter, double angle) -
calculateY
private static double calculateY(double chainDiameter, double angle) -
computeChainDiameter
protected double computeChainDiameter(double beadDiameter) The chain is the circle that runs through the bead's centers- Parameters:
size-width-- Returns:
-
determineBeadDiameter
-
determineBeadDiameterUsingWidthOrHeight
-
determineBeadDiameterUsingTheDiagonal
-
calculateNodeWidth
-
calculateNodeHeight
-
degreesToRadials
private static double degreesToRadials(double d)
-