Module jfxtras.menu

Class CornerMenu

java.lang.Object
jfxtras.scene.menu.CornerMenu

public class CornerMenu extends Object
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 Details

  • 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> items
      items
    • 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

      private final CircularPane circularPane
  • Constructor Details

    • CornerMenu

      public CornerMenu(CornerMenu.Location location, javafx.scene.layout.Pane pane, boolean shown)
  • Method Details

    • construct

      private void construct(javafx.scene.layout.Pane pane, boolean shown)
    • locationProperty

      public javafx.beans.property.ReadOnlyObjectProperty<CornerMenu.Location> locationProperty()
      Location: TOP_LEFT, TOP_RIGHT, BOTTOM_RIGHT, BOTTOM_LEFT
      See Also:
    • getLocation

      public CornerMenu.Location 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:
      See Also:
    • isAutoShowAndHide

      public Boolean isAutoShowAndHide()
      Gets the value of the property autoShowAndHide.
      Property description:
      AutoShowAndHide:
    • setAutoShowAndHide

      public void setAutoShowAndHide(Boolean value)
      Sets the value of the property autoShowAndHide.
      Property description:
      AutoShowAndHide:
    • withAutoShowAndHide

      public CornerMenu withAutoShowAndHide(Boolean value)
    • 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
      See Also:
    • 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

      public CornerMenu withAnimationDuration(javafx.util.Duration value)
    • 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)
      See Also:
    • getAnimationInterpolation

      public CircularPane.AnimationInterpolation 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

      public void setAnimationInterpolation(CircularPane.AnimationInterpolation value)
      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

      public CornerMenu withAnimationInterpolation(CircularPane.AnimationInterpolation value)
    • 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)