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 theanimationDuration
property.Gets the value of theanimationInterpolation
property.final javafx.collections.ObservableList
<javafx.scene.control.MenuItem> getItems()
Gets the value of thelocation
property.void
hide()
Gets the value of theautoShowAndHide
property.final boolean
isShown()
Gets the value of theshown
property.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 theanimationDuration
property.void
Sets the value of theanimationInterpolation
property.void
setAutoShowAndHide
(Boolean value) Sets the value of theautoShowAndHide
property.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:- 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:
-
-
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- Returns:
- the
location
property - See Also:
-
getLocation
Gets the value of thelocation
property.- Property description:
- Location: TOP_LEFT, TOP_RIGHT, BOTTOM_RIGHT, BOTTOM_LEFT
- Returns:
- the value of the
location
property - See Also:
-
getItems
public final javafx.collections.ObservableList<javafx.scene.control.MenuItem> getItems() -
autoShowAndHideProperty
public javafx.beans.property.BooleanProperty autoShowAndHideProperty()AutoShowAndHide:- Returns:
- the
autoShowAndHide
property - See Also:
-
isAutoShowAndHide
Gets the value of theautoShowAndHide
property.- Property description:
- AutoShowAndHide:
- Returns:
- the value of the
autoShowAndHide
property - See Also:
-
setAutoShowAndHide
Sets the value of theautoShowAndHide
property.- Property description:
- AutoShowAndHide:
- Parameters:
value
- the value for theautoShowAndHide
property- See Also:
-
withAutoShowAndHide
-
shownProperty
public final javafx.beans.property.ReadOnlyBooleanProperty shownProperty()shown- Returns:
- the
shown
property - See Also:
-
setShown
private void setShown(boolean value) -
isShown
public final boolean isShown()Gets the value of theshown
property.- Property description:
- shown
- Returns:
- the value of the
shown
property - See Also:
-
animationDurationProperty
public javafx.beans.property.ObjectProperty<javafx.util.Duration> animationDurationProperty()animationDuration- Returns:
- the
animationDuration
property - See Also:
-
getAnimationDuration
public javafx.util.Duration getAnimationDuration()Gets the value of theanimationDuration
property.- Property description:
- animationDuration
- Returns:
- the value of the
animationDuration
property - See Also:
-
setAnimationDuration
public void setAnimationDuration(javafx.util.Duration value) Sets the value of theanimationDuration
property.- Property description:
- animationDuration
- Parameters:
value
- the value for theanimationDuration
property- 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
animationInterpolation
property - See Also:
-
getAnimationInterpolation
Gets the value of theanimationInterpolation
property.- 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
animationInterpolation
property - See Also:
-
setAnimationInterpolation
Sets the value of theanimationInterpolation
property.- 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 theanimationInterpolation
property- See Also:
-
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)
-