Class CornerMenu
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.
- Author:
- Tom Eugelink
-
Nested Class Summary
Nested Classes -
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.BooleanPropertyAutoShowAndHide:javafx.beans.property.ReadOnlyObjectProperty<CornerMenu.Location> Location: TOP_LEFT, TOP_RIGHT, BOTTOM_RIGHT, BOTTOM_LEFTfinal javafx.beans.property.ReadOnlyBooleanPropertyshown -
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.BooleanPropertyAutoShowAndHide:javafx.util.DurationGets the value of theanimationDurationproperty.Gets the value of theanimationInterpolationproperty.final javafx.collections.ObservableList<javafx.scene.control.MenuItem> getItems()Gets the value of thelocationproperty.voidhide()Gets the value of theautoShowAndHideproperty.final booleanisShown()Gets the value of theshownproperty.javafx.beans.property.ReadOnlyObjectProperty<CornerMenu.Location> Location: TOP_LEFT, TOP_RIGHT, BOTTOM_RIGHT, BOTTOM_LEFTvoidvoidsetAnimationDuration(javafx.util.Duration value) Sets the value of theanimationDurationproperty.voidSets the value of theanimationInterpolationproperty.voidsetAutoShowAndHide(Boolean value) Sets the value of theautoShowAndHideproperty.voidshow()final javafx.beans.property.ReadOnlyBooleanPropertyshownwithAnimationDuration(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:- See Also:
-
shown
public final javafx.beans.property.ReadOnlyBooleanProperty shownPropertyshown- 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:
-
-
Constructor Details
-
Method Details
-
locationProperty
Location: TOP_LEFT, TOP_RIGHT, BOTTOM_RIGHT, BOTTOM_LEFT- Returns:
- the
locationproperty - See Also:
-
getLocation
Gets the value of thelocationproperty.- Property description:
- Location: TOP_LEFT, TOP_RIGHT, BOTTOM_RIGHT, BOTTOM_LEFT
- Returns:
- the value of the
locationproperty - See Also:
-
getItems
public final javafx.collections.ObservableList<javafx.scene.control.MenuItem> getItems() -
autoShowAndHideProperty
public javafx.beans.property.BooleanProperty autoShowAndHideProperty()AutoShowAndHide:- Returns:
- the
autoShowAndHideproperty - See Also:
-
isAutoShowAndHide
Gets the value of theautoShowAndHideproperty.- Property description:
- AutoShowAndHide:
- Returns:
- the value of the
autoShowAndHideproperty - See Also:
-
setAutoShowAndHide
Sets the value of theautoShowAndHideproperty.- Property description:
- AutoShowAndHide:
- Parameters:
value- the value for theautoShowAndHideproperty- See Also:
-
withAutoShowAndHide
-
shownProperty
public final javafx.beans.property.ReadOnlyBooleanProperty shownProperty()shown- Returns:
- the
shownproperty - See Also:
-
isShown
public final boolean isShown()Gets the value of theshownproperty.- Property description:
- shown
- Returns:
- the value of the
shownproperty - See Also:
-
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
-
show
public void show() -
hide
public void hide() -
removeFromPane
public void removeFromPane()
-