java.lang.Object
io.github.sosuisen.jfxbuilder.controls.ContextMenuBuilder

public class ContextMenuBuilder extends Object
The ContextMenuBuilder class constructs instances of the ContextMenu class and offers a fluent interface for creating and configuring it.

This class includes a static create method that accepts the same arguments as the original ContextMenu constructor and returns an instance of the ContextMenuBuilder.

You can use method chaining to call the builder methods for configuring the ContextMenu. Finally, invoke the build method to generate an instance of the ContextMenu class.

Note that intermediate builder methods are not evaluated until the build method is called, meaning they are evaluated lazily.

Author:
Hidekazu Kubota <hidekazu.kubota@gmail.com>
  • Method Details

    • create

      public static ContextMenuBuilder create()
      Returns an instance of the ContextMenuBuilder.
      Returns:
      an instance of the ContextMenuBuilder.
    • create

      public static ContextMenuBuilder create(MenuItem... items)
      Accepts the constructor arguments of ContextMenu(MenuItem...) and returns an instance of ContextMenuBuilder.
      Returns:
      an instance of the ContextMenuBuilder.
    • build

      public ContextMenu build()
      Builds and returns an instance of the ContextMenu class.

      Intermediate builder methods are not evaluated until the build method is called; in other words, they are evaluated lazily.

      Returns:
      new instance of the ContextMenu class
    • apply

      public ContextMenuBuilder apply(Consumer<ContextMenu> func)
      Applies a function to the ContextMenu instance being constructed. Most operations on the instance can be performed using this method.
      Returns:
      builder instance
    • anchorLocation

      public ContextMenuBuilder anchorLocation(PopupWindow.AnchorLocation value)
      A builder method that invokes the setAnchorLocation method on the instance being constructed.
      Returns:
      builder instance
    • anchorX

      public ContextMenuBuilder anchorX(double value)
      A builder method that invokes the setAnchorX method on the instance being constructed.
      Returns:
      builder instance
    • anchorY

      public ContextMenuBuilder anchorY(double value)
      A builder method that invokes the setAnchorY method on the instance being constructed.
      Returns:
      builder instance
    • autoFix

      public ContextMenuBuilder autoFix(boolean value)
      A builder method that invokes the setAutoFix method on the instance being constructed.
      Returns:
      builder instance
    • autoHide

      public ContextMenuBuilder autoHide(boolean value)
      A builder method that invokes the setAutoHide method on the instance being constructed.
      Returns:
      builder instance
    • consumeAutoHidingEvents

      public ContextMenuBuilder consumeAutoHidingEvents(boolean value)
      A builder method that invokes the setConsumeAutoHidingEvents method on the instance being constructed.
      Returns:
      builder instance
    • eventDispatcher

      public ContextMenuBuilder eventDispatcher(EventDispatcher value)
      A builder method that invokes the setEventDispatcher method on the instance being constructed.
      Returns:
      builder instance
    • forceIntegerRenderScale

      public ContextMenuBuilder forceIntegerRenderScale(boolean forced)
      A builder method that invokes the setForceIntegerRenderScale method on the instance being constructed.
      Returns:
      builder instance
    • height

      public ContextMenuBuilder height(double value)
      A builder method that invokes the setHeight method on the instance being constructed.
      Returns:
      builder instance
    • hideOnEscape

      public ContextMenuBuilder hideOnEscape(boolean value)
      A builder method that invokes the setHideOnEscape method on the instance being constructed.
      Returns:
      builder instance
    • id

      public ContextMenuBuilder id(String value)
      A builder method that invokes the setId method on the instance being constructed.
      Returns:
      builder instance
    • maxHeight

      public ContextMenuBuilder maxHeight(double value)
      A builder method that invokes the setMaxHeight method on the instance being constructed.
      Returns:
      builder instance
    • maxSize

      public ContextMenuBuilder maxSize(double maxWidth, double maxHeight)
      A builder method that invokes the setMaxSize method on the instance being constructed.
      Returns:
      builder instance
    • maxWidth

      public ContextMenuBuilder maxWidth(double value)
      A builder method that invokes the setMaxWidth method on the instance being constructed.
      Returns:
      builder instance
    • minHeight

      public ContextMenuBuilder minHeight(double value)
      A builder method that invokes the setMinHeight method on the instance being constructed.
      Returns:
      builder instance
    • minSize

      public ContextMenuBuilder minSize(double minWidth, double minHeight)
      A builder method that invokes the setMinSize method on the instance being constructed.
      Returns:
      builder instance
    • minWidth

      public ContextMenuBuilder minWidth(double value)
      A builder method that invokes the setMinWidth method on the instance being constructed.
      Returns:
      builder instance
    • onAction

      public ContextMenuBuilder onAction(EventHandler<ActionEvent> value)
      A builder method that invokes the setOnAction method on the instance being constructed.
      Returns:
      builder instance
    • onAutoHide

      public ContextMenuBuilder onAutoHide(EventHandler<Event> value)
      A builder method that invokes the setOnAutoHide method on the instance being constructed.
      Returns:
      builder instance
    • onCloseRequest

      public ContextMenuBuilder onCloseRequest(EventHandler<WindowEvent> value)
      A builder method that invokes the setOnCloseRequest method on the instance being constructed.
      Returns:
      builder instance
    • onHidden

      public ContextMenuBuilder onHidden(EventHandler<WindowEvent> value)
      A builder method that invokes the setOnHidden method on the instance being constructed.
      Returns:
      builder instance
    • onHiding

      public ContextMenuBuilder onHiding(EventHandler<WindowEvent> value)
      A builder method that invokes the setOnHiding method on the instance being constructed.
      Returns:
      builder instance
    • onShowing

      public ContextMenuBuilder onShowing(EventHandler<WindowEvent> value)
      A builder method that invokes the setOnShowing method on the instance being constructed.
      Returns:
      builder instance
    • onShown

      public ContextMenuBuilder onShown(EventHandler<WindowEvent> value)
      A builder method that invokes the setOnShown method on the instance being constructed.
      Returns:
      builder instance
    • opacity

      public ContextMenuBuilder opacity(double value)
      A builder method that invokes the setOpacity method on the instance being constructed.
      Returns:
      builder instance
    • prefHeight

      public ContextMenuBuilder prefHeight(double value)
      A builder method that invokes the setPrefHeight method on the instance being constructed.
      Returns:
      builder instance
    • prefSize

      public ContextMenuBuilder prefSize(double prefWidth, double prefHeight)
      A builder method that invokes the setPrefSize method on the instance being constructed.
      Returns:
      builder instance
    • prefWidth

      public ContextMenuBuilder prefWidth(double value)
      A builder method that invokes the setPrefWidth method on the instance being constructed.
      Returns:
      builder instance
    • renderScaleX

      public ContextMenuBuilder renderScaleX(double scale)
      A builder method that invokes the setRenderScaleX method on the instance being constructed.
      Returns:
      builder instance
    • renderScaleY

      public ContextMenuBuilder renderScaleY(double scale)
      A builder method that invokes the setRenderScaleY method on the instance being constructed.
      Returns:
      builder instance
    • skin

      public ContextMenuBuilder skin(Skin<?> value)
      A builder method that invokes the setSkin method on the instance being constructed.
      Returns:
      builder instance
    • style

      public ContextMenuBuilder style(String value)
      A builder method that invokes the setStyle method on the instance being constructed.
      Returns:
      builder instance
    • userData

      public ContextMenuBuilder userData(Object value)
      A builder method that invokes the setUserData method on the instance being constructed.
      Returns:
      builder instance
    • width

      public ContextMenuBuilder width(double value)
      A builder method that invokes the setWidth method on the instance being constructed.
      Returns:
      builder instance
    • x

      public ContextMenuBuilder x(double value)
      A builder method that invokes the setX method on the instance being constructed.
      Returns:
      builder instance
    • y

      public ContextMenuBuilder y(double value)
      A builder method that invokes the setY method on the instance being constructed.
      Returns:
      builder instance
    • addItems

      public final ContextMenuBuilder addItems(MenuItem... elements)
      Calls the addAll method on the ObservableList returned by the ContextMenu#getItems() method.
      Returns:
      builder instance
    • addItems

      public final ContextMenuBuilder addItems(Collection<? extends MenuItem> col)
      Calls the addAll method on the ObservableList returned by the ContextMenu#getItems() method.
      Returns:
      builder instance
    • withItems

      public static ContextMenuBuilder withItems(MenuItem... elements)
      Creates an instance of the builder, then calls the addAll method on the ObservableList returned by the ContextMenu#getItems() method.
      Returns:
      builder instance
    • withItems

      public static ContextMenuBuilder withItems(Collection<? extends MenuItem> col)
      Creates an instance of the builder, then calls the addAll method on the ObservableList returned by the ContextMenu#getItems() method.
      Returns:
      builder instance
    • addStyleClass

      public final ContextMenuBuilder addStyleClass(String... elements)
      Calls the addAll method on the ObservableList returned by the ContextMenu#getStyleClass() method.
      Returns:
      builder instance
    • addStyleClass

      public final ContextMenuBuilder addStyleClass(Collection<? extends String> col)
      Calls the addAll method on the ObservableList returned by the ContextMenu#getStyleClass() method.
      Returns:
      builder instance
    • anchorLocationPropertyApply

      public ContextMenuBuilder anchorLocationPropertyApply(Consumer<ObjectProperty<PopupWindow.AnchorLocation>> op)
      Applies a function to the anchorLocationProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.anchorLocationProperty().bind(anotherProperty))
      
      // Use shorthand form
      .anchorLocationPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • anchorXPropertyApply

      public ContextMenuBuilder anchorXPropertyApply(Consumer<ReadOnlyDoubleProperty> op)
      Applies a function to the anchorXProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.anchorXProperty().bind(anotherProperty))
      
      // Use shorthand form
      .anchorXPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • anchorYPropertyApply

      public ContextMenuBuilder anchorYPropertyApply(Consumer<ReadOnlyDoubleProperty> op)
      Applies a function to the anchorYProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.anchorYProperty().bind(anotherProperty))
      
      // Use shorthand form
      .anchorYPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • autoFixPropertyApply

      public ContextMenuBuilder autoFixPropertyApply(Consumer<BooleanProperty> op)
      Applies a function to the autoFixProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.autoFixProperty().bind(anotherProperty))
      
      // Use shorthand form
      .autoFixPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • autoHidePropertyApply

      public ContextMenuBuilder autoHidePropertyApply(Consumer<BooleanProperty> op)
      Applies a function to the autoHideProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.autoHideProperty().bind(anotherProperty))
      
      // Use shorthand form
      .autoHidePropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • consumeAutoHidingEventsPropertyApply

      public ContextMenuBuilder consumeAutoHidingEventsPropertyApply(Consumer<BooleanProperty> op)
      Applies a function to the consumeAutoHidingEventsProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.consumeAutoHidingEventsProperty().bind(anotherProperty))
      
      // Use shorthand form
      .consumeAutoHidingEventsPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • eventDispatcherPropertyApply

      public ContextMenuBuilder eventDispatcherPropertyApply(Consumer<ObjectProperty<EventDispatcher>> op)
      Applies a function to the eventDispatcherProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.eventDispatcherProperty().bind(anotherProperty))
      
      // Use shorthand form
      .eventDispatcherPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • focusedPropertyApply

      public ContextMenuBuilder focusedPropertyApply(Consumer<ReadOnlyBooleanProperty> op)
      Applies a function to the focusedProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.focusedProperty().bind(anotherProperty))
      
      // Use shorthand form
      .focusedPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • forceIntegerRenderScalePropertyApply

      public ContextMenuBuilder forceIntegerRenderScalePropertyApply(Consumer<BooleanProperty> op)
      Applies a function to the forceIntegerRenderScaleProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.forceIntegerRenderScaleProperty().bind(anotherProperty))
      
      // Use shorthand form
      .forceIntegerRenderScalePropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • heightPropertyApply

      public ContextMenuBuilder heightPropertyApply(Consumer<ReadOnlyDoubleProperty> op)
      Applies a function to the heightProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.heightProperty().bind(anotherProperty))
      
      // Use shorthand form
      .heightPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • hideOnEscapePropertyApply

      public ContextMenuBuilder hideOnEscapePropertyApply(Consumer<BooleanProperty> op)
      Applies a function to the hideOnEscapeProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.hideOnEscapeProperty().bind(anotherProperty))
      
      // Use shorthand form
      .hideOnEscapePropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • idPropertyApply

      public ContextMenuBuilder idPropertyApply(Consumer<StringProperty> op)
      Applies a function to the idProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.idProperty().bind(anotherProperty))
      
      // Use shorthand form
      .idPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • maxHeightPropertyApply

      public ContextMenuBuilder maxHeightPropertyApply(Consumer<DoubleProperty> op)
      Applies a function to the maxHeightProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.maxHeightProperty().bind(anotherProperty))
      
      // Use shorthand form
      .maxHeightPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • maxWidthPropertyApply

      public ContextMenuBuilder maxWidthPropertyApply(Consumer<DoubleProperty> op)
      Applies a function to the maxWidthProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.maxWidthProperty().bind(anotherProperty))
      
      // Use shorthand form
      .maxWidthPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • minHeightPropertyApply

      public ContextMenuBuilder minHeightPropertyApply(Consumer<DoubleProperty> op)
      Applies a function to the minHeightProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.minHeightProperty().bind(anotherProperty))
      
      // Use shorthand form
      .minHeightPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • minWidthPropertyApply

      public ContextMenuBuilder minWidthPropertyApply(Consumer<DoubleProperty> op)
      Applies a function to the minWidthProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.minWidthProperty().bind(anotherProperty))
      
      // Use shorthand form
      .minWidthPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • onActionPropertyApply

      public ContextMenuBuilder onActionPropertyApply(Consumer<ObjectProperty<EventHandler<ActionEvent>>> op)
      Applies a function to the onActionProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.onActionProperty().bind(anotherProperty))
      
      // Use shorthand form
      .onActionPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • onAutoHidePropertyApply

      public ContextMenuBuilder onAutoHidePropertyApply(Consumer<ObjectProperty<EventHandler<Event>>> op)
      Applies a function to the onAutoHideProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.onAutoHideProperty().bind(anotherProperty))
      
      // Use shorthand form
      .onAutoHidePropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • onCloseRequestPropertyApply

      public ContextMenuBuilder onCloseRequestPropertyApply(Consumer<ObjectProperty<EventHandler<WindowEvent>>> op)
      Applies a function to the onCloseRequestProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.onCloseRequestProperty().bind(anotherProperty))
      
      // Use shorthand form
      .onCloseRequestPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • onHiddenPropertyApply

      public ContextMenuBuilder onHiddenPropertyApply(Consumer<ObjectProperty<EventHandler<WindowEvent>>> op)
      Applies a function to the onHiddenProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.onHiddenProperty().bind(anotherProperty))
      
      // Use shorthand form
      .onHiddenPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • onHidingPropertyApply

      public ContextMenuBuilder onHidingPropertyApply(Consumer<ObjectProperty<EventHandler<WindowEvent>>> op)
      Applies a function to the onHidingProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.onHidingProperty().bind(anotherProperty))
      
      // Use shorthand form
      .onHidingPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • onShowingPropertyApply

      public ContextMenuBuilder onShowingPropertyApply(Consumer<ObjectProperty<EventHandler<WindowEvent>>> op)
      Applies a function to the onShowingProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.onShowingProperty().bind(anotherProperty))
      
      // Use shorthand form
      .onShowingPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • onShownPropertyApply

      public ContextMenuBuilder onShownPropertyApply(Consumer<ObjectProperty<EventHandler<WindowEvent>>> op)
      Applies a function to the onShownProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.onShownProperty().bind(anotherProperty))
      
      // Use shorthand form
      .onShownPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • opacityPropertyApply

      public ContextMenuBuilder opacityPropertyApply(Consumer<DoubleProperty> op)
      Applies a function to the opacityProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.opacityProperty().bind(anotherProperty))
      
      // Use shorthand form
      .opacityPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • outputScaleXPropertyApply

      public ContextMenuBuilder outputScaleXPropertyApply(Consumer<ReadOnlyDoubleProperty> op)
      Applies a function to the outputScaleXProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.outputScaleXProperty().bind(anotherProperty))
      
      // Use shorthand form
      .outputScaleXPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • outputScaleYPropertyApply

      public ContextMenuBuilder outputScaleYPropertyApply(Consumer<ReadOnlyDoubleProperty> op)
      Applies a function to the outputScaleYProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.outputScaleYProperty().bind(anotherProperty))
      
      // Use shorthand form
      .outputScaleYPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • ownerNodePropertyApply

      public ContextMenuBuilder ownerNodePropertyApply(Consumer<ReadOnlyObjectProperty<Node>> op)
      Applies a function to the ownerNodeProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.ownerNodeProperty().bind(anotherProperty))
      
      // Use shorthand form
      .ownerNodePropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • ownerWindowPropertyApply

      public ContextMenuBuilder ownerWindowPropertyApply(Consumer<ReadOnlyObjectProperty<Window>> op)
      Applies a function to the ownerWindowProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.ownerWindowProperty().bind(anotherProperty))
      
      // Use shorthand form
      .ownerWindowPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • prefHeightPropertyApply

      public ContextMenuBuilder prefHeightPropertyApply(Consumer<DoubleProperty> op)
      Applies a function to the prefHeightProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.prefHeightProperty().bind(anotherProperty))
      
      // Use shorthand form
      .prefHeightPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • prefWidthPropertyApply

      public ContextMenuBuilder prefWidthPropertyApply(Consumer<DoubleProperty> op)
      Applies a function to the prefWidthProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.prefWidthProperty().bind(anotherProperty))
      
      // Use shorthand form
      .prefWidthPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • renderScaleXPropertyApply

      public ContextMenuBuilder renderScaleXPropertyApply(Consumer<DoubleProperty> op)
      Applies a function to the renderScaleXProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.renderScaleXProperty().bind(anotherProperty))
      
      // Use shorthand form
      .renderScaleXPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • renderScaleYPropertyApply

      public ContextMenuBuilder renderScaleYPropertyApply(Consumer<DoubleProperty> op)
      Applies a function to the renderScaleYProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.renderScaleYProperty().bind(anotherProperty))
      
      // Use shorthand form
      .renderScaleYPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • scenePropertyApply

      public ContextMenuBuilder scenePropertyApply(Consumer<ReadOnlyObjectProperty<Scene>> op)
      Applies a function to the sceneProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.sceneProperty().bind(anotherProperty))
      
      // Use shorthand form
      .scenePropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • showingPropertyApply

      public ContextMenuBuilder showingPropertyApply(Consumer<ReadOnlyBooleanProperty> op)
      Applies a function to the showingProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.showingProperty().bind(anotherProperty))
      
      // Use shorthand form
      .showingPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • skinPropertyApply

      public ContextMenuBuilder skinPropertyApply(Consumer<ObjectProperty<Skin<?>>> op)
      Applies a function to the skinProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.skinProperty().bind(anotherProperty))
      
      // Use shorthand form
      .skinPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • stylePropertyApply

      public ContextMenuBuilder stylePropertyApply(Consumer<StringProperty> op)
      Applies a function to the styleProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.styleProperty().bind(anotherProperty))
      
      // Use shorthand form
      .stylePropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • widthPropertyApply

      public ContextMenuBuilder widthPropertyApply(Consumer<ReadOnlyDoubleProperty> op)
      Applies a function to the widthProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.widthProperty().bind(anotherProperty))
      
      // Use shorthand form
      .widthPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • xPropertyApply

      public ContextMenuBuilder xPropertyApply(Consumer<ReadOnlyDoubleProperty> op)
      Applies a function to the xProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.xProperty().bind(anotherProperty))
      
      // Use shorthand form
      .xPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • yPropertyApply

      public ContextMenuBuilder yPropertyApply(Consumer<ReadOnlyDoubleProperty> op)
      Applies a function to the yProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.yProperty().bind(anotherProperty))
      
      // Use shorthand form
      .yPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance