java.lang.Object
jfxtras.scene.menu.CornerMenu
CornerMenu is a menu is intended to be placed in one of the four corners of a pane.
It will show the provided menu items in a 90 degree arc with the origin in the corner.
It is possible to, and per default will, animate the menu items in and out of view.
The showing and hiding of the menu items can be done automatically based on the mouse pointer location.
CornerMenu requires a Pane to attach itself to.
CornerMenu uses CircularPane and this will leak through in the API.
For example: it is possible to customize the animation, and required interface to implement is the one from CircularPane.
-
Property Summary
PropertiesTypePropertyDescriptionjavafx.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.BooleanProperty
AutoShowAndHide:javafx.beans.property.ReadOnlyObjectProperty<CornerMenu.Location>
Location: TOP_LEFT, TOP_RIGHT, BOTTOM_RIGHT, BOTTOM_LEFTfinal javafx.beans.property.ReadOnlyBooleanProperty
shown -
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate class
static enum
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final javafx.beans.property.ObjectProperty<javafx.util.Duration>
private final javafx.beans.property.ObjectProperty<CircularPane.AnimationInterpolation>
private final javafx.beans.property.SimpleBooleanProperty
private final CircularPane
private final javafx.collections.ObservableList<javafx.scene.control.MenuItem>
itemsprivate final javafx.beans.property.SimpleObjectProperty<CornerMenu.Location>
private final AtomicLong
private javafx.scene.layout.Pane
private javafx.beans.property.ReadOnlyBooleanWrapper
-
Constructor Summary
ConstructorsConstructorDescriptionCornerMenu
(CornerMenu.Location location, javafx.scene.layout.Pane pane, boolean shown) -
Method Summary
Modifier and TypeMethodDescriptionjavafx.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.BooleanProperty
AutoShowAndHide:private void
autoShowOrHide
(javafx.scene.input.MouseEvent mouseEvent) private void
construct
(javafx.scene.layout.Pane pane, boolean shown) javafx.util.Duration
Gets the value of the property animationDuration.Gets the value of the property animationInterpolation.final javafx.collections.ObservableList<javafx.scene.control.MenuItem>
getItems()
Gets the value of the property location.void
hide()
Gets the value of the property autoShowAndHide.final boolean
isShown()
Gets the value of the property shown.javafx.beans.property.ReadOnlyObjectProperty<CornerMenu.Location>
Location: TOP_LEFT, TOP_RIGHT, BOTTOM_RIGHT, BOTTOM_LEFTvoid
void
setAnimationDuration
(javafx.util.Duration value) Sets the value of the property animationDuration.void
Sets the value of the property animationInterpolation.void
setAutoShowAndHide
(Boolean value) Sets the value of the property autoShowAndHide.private void
setShown
(boolean value) private void
void
show()
final javafx.beans.property.ReadOnlyBooleanProperty
shownwithAnimationDuration
(javafx.util.Duration value) withAutoShowAndHide
(Boolean value)
-
Property Details
-
location
Location: TOP_LEFT, TOP_RIGHT, BOTTOM_RIGHT, BOTTOM_LEFT- See Also:
-
autoShowAndHide
public javafx.beans.property.BooleanProperty autoShowAndHidePropertyAutoShowAndHide: -
shown
public final javafx.beans.property.ReadOnlyBooleanProperty shownPropertyshown- See Also:
-
animationDuration
public javafx.beans.property.ObjectProperty<javafx.util.Duration> animationDurationPropertyanimationDuration -
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)
-
-
Field Details
-
pane
private javafx.scene.layout.Pane pane -
locationObjectProperty
private final javafx.beans.property.SimpleObjectProperty<CornerMenu.Location> locationObjectProperty -
items
private final javafx.collections.ObservableList<javafx.scene.control.MenuItem> itemsitems -
autoShowAndHideObjectProperty
private final javafx.beans.property.SimpleBooleanProperty autoShowAndHideObjectProperty -
shown
private javafx.beans.property.ReadOnlyBooleanWrapper shown -
animationDurationObjectProperty
private final javafx.beans.property.ObjectProperty<javafx.util.Duration> animationDurationObjectProperty -
animationInterpolationObjectProperty
private final javafx.beans.property.ObjectProperty<CircularPane.AnimationInterpolation> animationInterpolationObjectProperty -
circularPane
-
-
Constructor Details
-
Method Details
-
construct
private void construct(javafx.scene.layout.Pane pane, boolean shown) -
locationProperty
Location: TOP_LEFT, TOP_RIGHT, BOTTOM_RIGHT, BOTTOM_LEFT- See Also:
-
getLocation
Gets the value of the property location.- Property description:
- Location: TOP_LEFT, TOP_RIGHT, BOTTOM_RIGHT, BOTTOM_LEFT
-
getItems
public final javafx.collections.ObservableList<javafx.scene.control.MenuItem> getItems() -
autoShowAndHideProperty
public javafx.beans.property.BooleanProperty autoShowAndHideProperty()AutoShowAndHide: -
isAutoShowAndHide
Gets the value of the property autoShowAndHide.- Property description:
- AutoShowAndHide:
-
setAutoShowAndHide
Sets the value of the property autoShowAndHide.- Property description:
- AutoShowAndHide:
-
withAutoShowAndHide
-
shownProperty
public final javafx.beans.property.ReadOnlyBooleanProperty shownProperty()shown- See Also:
-
setShown
private void setShown(boolean value) -
isShown
public final boolean isShown()Gets the value of the property shown.- Property description:
- shown
-
animationDurationProperty
public javafx.beans.property.ObjectProperty<javafx.util.Duration> animationDurationProperty()animationDuration -
getAnimationDuration
public javafx.util.Duration getAnimationDuration()Gets the value of the property animationDuration.- Property description:
- animationDuration
-
setAnimationDuration
public void setAnimationDuration(javafx.util.Duration value) Sets the value of the property animationDuration.- Property description:
- animationDuration
-
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) -
getAnimationInterpolation
Gets the value of the property animationInterpolation.- 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)
-
setAnimationInterpolation
Sets the value of the property animationInterpolation.- 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)
-
withAnimationInterpolation
-
show
public void show() -
hide
public void hide() -
removeFromPane
public void removeFromPane() -
setupCircularPane
private void setupCircularPane() -
autoShowOrHide
private void autoShowOrHide(javafx.scene.input.MouseEvent mouseEvent)
-