public class CirclePopupMenu
extends java.lang.Object
CirclePopupMenu is a menu is intended to pop up at any place in a scene. It will show the provided menu items in a circle with the origin at the point where the mouse button was clicked. It is possible to, and per default will, animate the menu items in and out of view.
CirclePopupMenu requires a node to attach itself to, most commonly this will be the outer (largest) pane, but it is also possible to register to a specific node.
CirclePopupMenu uses CircularPane and this will leak through in the API. For example: it is possible to customize the animation, and the required interface to implement is the one from CircularPane.
Type | Property and Description |
---|---|
javafx.beans.property.ObjectProperty<javafx.util.Duration> |
animationDuration
|
javafx.beans.property.ObjectProperty<jfxtras.scene.layout.CircularPane.AnimationInterpolation> |
animationInterpolation
|
javafx.beans.property.ReadOnlyBooleanProperty |
shown
|
Constructor and Description |
---|
CirclePopupMenu(javafx.scene.Node node,
javafx.scene.input.MouseButton mouseButton) |
Modifier and Type | Method and Description |
---|---|
javafx.beans.property.ObjectProperty<javafx.util.Duration> |
animationDurationProperty()
|
javafx.beans.property.ObjectProperty<jfxtras.scene.layout.CircularPane.AnimationInterpolation> |
animationInterpolationProperty()
|
javafx.util.Duration |
getAnimationDuration() |
jfxtras.scene.layout.CircularPane.AnimationInterpolation |
getAnimationInterpolation() |
javafx.collections.ObservableList<javafx.scene.control.MenuItem> |
getItems() |
void |
hide() |
boolean |
isShown() |
void |
setAnimationDuration(javafx.util.Duration value) |
void |
setAnimationInterpolation(jfxtras.scene.layout.CircularPane.AnimationInterpolation value) |
void |
show(double x,
double y) |
void |
show(javafx.scene.input.MouseEvent mouseEvent) |
javafx.beans.property.ReadOnlyBooleanProperty |
shownProperty()
|
CirclePopupMenu |
withAnimationDuration(javafx.util.Duration value) |
CirclePopupMenu |
withAnimationInterpolation(jfxtras.scene.layout.CircularPane.AnimationInterpolation value) |
public final javafx.beans.property.ReadOnlyBooleanProperty shownProperty
shown
isShown()
public javafx.beans.property.ObjectProperty<javafx.util.Duration> animationDurationProperty
animationDuration
public javafx.beans.property.ObjectProperty<jfxtras.scene.layout.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)
getAnimationInterpolation()
,
#setAnimationInterpolation(AnimationInterpolation)
public CirclePopupMenu(javafx.scene.Node node, javafx.scene.input.MouseButton mouseButton)
node
- the node to render upon, this probably should be a PanemouseButton
- the mouse button on which the popup is shown (null means the coder will take care of showing and hiding)public final javafx.collections.ObservableList<javafx.scene.control.MenuItem> getItems()
public final javafx.beans.property.ReadOnlyBooleanProperty shownProperty()
shown
isShown()
public final boolean isShown()
public javafx.beans.property.ObjectProperty<javafx.util.Duration> animationDurationProperty()
animationDuration
public javafx.util.Duration getAnimationDuration()
public void setAnimationDuration(javafx.util.Duration value)
public CirclePopupMenu withAnimationDuration(javafx.util.Duration value)
public javafx.beans.property.ObjectProperty<jfxtras.scene.layout.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)
getAnimationInterpolation()
,
#setAnimationInterpolation(AnimationInterpolation)
public jfxtras.scene.layout.CircularPane.AnimationInterpolation getAnimationInterpolation()
public void setAnimationInterpolation(jfxtras.scene.layout.CircularPane.AnimationInterpolation value)
public CirclePopupMenu withAnimationInterpolation(jfxtras.scene.layout.CircularPane.AnimationInterpolation value)
public void show(javafx.scene.input.MouseEvent mouseEvent)
mouseEvent
- public void show(double x, double y)
x
- origin of the circley
- origin of the circlepublic void hide()