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

public class SeparatorMenuItemBuilder extends Object
The SeparatorMenuItemBuilder class constructs instances of the SeparatorMenuItem 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 SeparatorMenuItem constructor and returns an instance of the SeparatorMenuItemBuilder.

You can use method chaining to call the builder methods for configuring the SeparatorMenuItem. Finally, invoke the build method to generate an instance of the SeparatorMenuItem 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 SeparatorMenuItemBuilder create()
      Returns an instance of the SeparatorMenuItemBuilder.
      Returns:
      an instance of the SeparatorMenuItemBuilder.
    • build

      public SeparatorMenuItem build()
      Builds and returns an instance of the SeparatorMenuItem 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 SeparatorMenuItem class
    • apply

      Applies a function to the SeparatorMenuItem instance being constructed. Most operations on the instance can be performed using this method.
      Returns:
      builder instance
    • accelerator

      public SeparatorMenuItemBuilder accelerator(KeyCombination value)
      A builder method that invokes the setAccelerator method on the instance being constructed.
      Returns:
      builder instance
    • content

      public SeparatorMenuItemBuilder content(Node value)
      A builder method that invokes the setContent method on the instance being constructed.
      Returns:
      builder instance
    • disable

      public SeparatorMenuItemBuilder disable(boolean value)
      A builder method that invokes the setDisable method on the instance being constructed.
      Returns:
      builder instance
    • graphic

      public SeparatorMenuItemBuilder graphic(Node value)
      A builder method that invokes the setGraphic method on the instance being constructed.
      Returns:
      builder instance
    • hideOnClick

      public SeparatorMenuItemBuilder hideOnClick(boolean value)
      A builder method that invokes the setHideOnClick method on the instance being constructed.
      Returns:
      builder instance
    • id

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

      public SeparatorMenuItemBuilder mnemonicParsing(boolean value)
      A builder method that invokes the setMnemonicParsing method on the instance being constructed.
      Returns:
      builder instance
    • onAction

      A builder method that invokes the setOnAction method on the instance being constructed.
      Returns:
      builder instance
    • onMenuValidation

      public SeparatorMenuItemBuilder onMenuValidation(EventHandler<Event> value)
      A builder method that invokes the setOnMenuValidation method on the instance being constructed.
      Returns:
      builder instance
    • style

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

      public SeparatorMenuItemBuilder text(String value)
      A builder method that invokes the setText method on the instance being constructed.
      Returns:
      builder instance
    • userData

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

      public SeparatorMenuItemBuilder visible(boolean value)
      A builder method that invokes the setVisible method on the instance being constructed.
      Returns:
      builder instance
    • addStyleClass

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

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

      public SeparatorMenuItemBuilder acceleratorPropertyApply(Consumer<ObjectProperty<KeyCombination>> op)
      Applies a function to the acceleratorProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.acceleratorProperty().bind(anotherProperty))
      
      // Use shorthand form
      .acceleratorPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • contentPropertyApply

      public SeparatorMenuItemBuilder contentPropertyApply(Consumer<ObjectProperty<Node>> op)
      Applies a function to the contentProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.contentProperty().bind(anotherProperty))
      
      // Use shorthand form
      .contentPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • disablePropertyApply

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

      Example:

      // Use apply
      .apply(obj -> obj.disableProperty().bind(anotherProperty))
      
      // Use shorthand form
      .disablePropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • graphicPropertyApply

      public SeparatorMenuItemBuilder graphicPropertyApply(Consumer<ObjectProperty<Node>> op)
      Applies a function to the graphicProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.graphicProperty().bind(anotherProperty))
      
      // Use shorthand form
      .graphicPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • hideOnClickPropertyApply

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

      Example:

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

      public SeparatorMenuItemBuilder 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
    • mnemonicParsingPropertyApply

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

      Example:

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

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

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

      Example:

      // Use apply
      .apply(obj -> obj.onMenuValidationProperty().bind(anotherProperty))
      
      // Use shorthand form
      .onMenuValidationPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • parentMenuPropertyApply

      public SeparatorMenuItemBuilder parentMenuPropertyApply(Consumer<ReadOnlyObjectProperty<Menu>> op)
      Applies a function to the parentMenuProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

      // Use apply
      .apply(obj -> obj.parentMenuProperty().bind(anotherProperty))
      
      // Use shorthand form
      .parentMenuPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • parentPopupPropertyApply

      public SeparatorMenuItemBuilder parentPopupPropertyApply(Consumer<ReadOnlyObjectProperty<ContextMenu>> op)
      Applies a function to the parentPopupProperty of the instance being constructed. This serves as a shorthand form of the apply method.

      Example:

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

      public SeparatorMenuItemBuilder 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
    • textPropertyApply

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

      Example:

      // Use apply
      .apply(obj -> obj.textProperty().bind(anotherProperty))
      
      // Use shorthand form
      .textPropertyApply(prop -> prop.bind(anotherProperty))
      
      Returns:
      builder instance
    • visiblePropertyApply

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

      Example:

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