Klasse LabeledBuilder<N extends Labeled,NN extends LabeledBuilder<N,NN>>

Typparameter:
N - the type of Labeled node to be built
NN - the type of the concrete builder
Bekannte direkte Unterklassen:
ButtonBaseBuilder, LabelBuilder

public abstract class LabeledBuilder<N extends Labeled,NN extends LabeledBuilder<N,NN>> extends ControlBuilder<N,NN>
LabeledBuilder is an abstract base class for building instances of Labeled nodes. It provides a fluent API for configuring properties such as text and graphics, allowing subclasses to create customized Labeled instances.
  • Konstruktordetails

    • LabeledBuilder

      protected LabeledBuilder(Supplier<? extends N> factory)
      Constructor.
      Parameter:
      factory - the factory method for Labeled instances
  • Methodendetails

    • build

      public N build()
      Build the Labeled.
      Setzt außer Kraft:
      build in Klasse ControlBuilder<N extends Labeled,NN extends LabeledBuilder<N,NN>>
      Gibt zurück:
      the new Labeled instance
    • text

      public NN text(String text)
      Set text for the Labeled.
      Parameter:
      text - the text
      Gibt zurück:
      this LabeledBuilder instance
    • bindText

      public NN bindText(ObservableValue<String> text)
      Set text for the Labeled.
      Parameter:
      text - the text
      Gibt zurück:
      this LabeledBuilder instance
    • graphic

      public NN graphic(Node graphic)
      Set the graphic for the Labeled.
      Parameter:
      graphic - the graphic to use
      Gibt zurück:
      this LabeledBuilder instance
    • graphic

      public NN graphic(ObservableValue<Node> graphic)
      Set the graphic for the Labeled.
      Parameter:
      graphic - the graphic to use
      Gibt zurück:
      this LabeledBuilder instance
    • font

      public NN font(Font font)
      Sets the font for the text node being built.
      Parameter:
      font - the Font to set for the text node
      Gibt zurück:
      this TextBuilder instance for fluent method chaining
    • font

      public NN font(com.dua3.utility.text.Font font)
      Sets the font for the text node being built.
      Parameter:
      font - the Font to set for the text node
      Gibt zurück:
      this TextBuilder instance for fluent method chaining
    • bindFxFont

      public NN bindFxFont(ObservableValue<Font> font)
      Binds the Font property of the Text node to the specified ObservableValue.

      This allows the font property of the node to dynamically update whenever the value in the provided observable changes.

      Parameter:
      font - the ObservableValue providing the font to bind to the node's font property
      Gibt zurück:
      this LabelBuilder instance for method chaining
    • bindFont

      public NN bindFont(ObservableValue<com.dua3.utility.text.Font> font)
      Binds the Font property of the Text node to the specified ObservableValue.

      This allows the font property of the node to dynamically update whenever the value in the provided observable changes.

      Parameter:
      font - the ObservableValue providing the font to bind to the node's font property
      Gibt zurück:
      this LabelBuilder instance for method chaining