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
      Returns:
      the location property
      See Also:
    • getLocation

      public CornerMenu.Location getLocation()
      Gets the value of the location 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

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

      public void setAutoShowAndHide(Boolean value)
      Sets the value of the autoShowAndHide property.
      Property description:
      AutoShowAndHide:
      Parameters:
      value - the value for the autoShowAndHide property
      See Also:
    • withAutoShowAndHide

      public CornerMenu withAutoShowAndHide(Boolean value)
    • 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 the shown 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 the animationDuration 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 the animationDuration property.
      Property description:
      animationDuration
      Parameters:
      value - the value for the animationDuration property
      See Also:
    • 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)
      Returns:
      the animationInterpolation property
      See Also:
    • getAnimationInterpolation

      public CircularPane.AnimationInterpolation getAnimationInterpolation()
      Gets the value of the animationInterpolation 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

      public void setAnimationInterpolation(CircularPane.AnimationInterpolation value)
      Sets the value of the animationInterpolation 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 the animationInterpolation property
      See Also:
    • 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)