Klasse ShapeBuilder<N extends Shape,NN extends ShapeBuilder<N,NN>>

java.lang.Object
com.dua3.utility.fx.controls.abstract_builders.NodeBuilder<N,NN>
com.dua3.utility.fx.controls.abstract_builders.ShapeBuilder<N,NN>
Typparameter:
N - the type of node to be built
NN - the type of the concrete builder
Bekannte direkte Unterklassen:
TextBuilder

public abstract class ShapeBuilder<N extends Shape,NN extends ShapeBuilder<N,NN>> extends NodeBuilder<N,NN>
An abstract base class for building nodes, providing a fluent API for configuring and creating instances of the node type specified by the generic parameter N.
  • Konstruktordetails

    • ShapeBuilder

      protected ShapeBuilder(Supplier<? extends N> factory)
      Constructs a new instance of the ControlBuilder class using the specified factory.
      Parameter:
      factory - the supplier that provides a new instance of the node type to be built
  • Methodendetails

    • build

      public N build()
      Build the Control.
      Setzt außer Kraft:
      build in Klasse NodeBuilder<N extends Shape,NN extends ShapeBuilder<N,NN>>
      Gibt zurück:
      new Control instance
    • fill

      public NN fill(Paint fill)
      Sets the fill property for the shape being built.
      Parameter:
      fill - the Paint to be used as the fill for the shape
      Gibt zurück:
      this builder instance
    • fill

      public NN fill(com.dua3.utility.data.Color fill)
      Sets the fill property for the shape being built.
      Parameter:
      fill - the Paint to be used as the fill for the shape
      Gibt zurück:
      this builder instance
    • bindFillFx

      public NN bindFillFx(ObservableValue<Paint> fill)
      Binds the given ObservableValue to the fill property of the node being built. This allows the fill property of the node to dynamically reflect the value of the provided observable.
      Parameter:
      fill - the ObservableValue representing the fill value to be bound
      Gibt zurück:
      this instance of the builder
    • bindFill

      public NN bindFill(ObservableValue<com.dua3.utility.data.Color> fill)
      Binds the given ObservableValue to the fill property of the node being built. This allows the fill property of the node to dynamically reflect the value of the provided observable.
      Parameter:
      fill - the ObservableValue representing the fill value to be bound
      Gibt zurück:
      this instance of the builder
    • stroke

      public NN stroke(Paint stroke)
      Sets the stroke paint property for the shape being built.
      Parameter:
      stroke - the Paint to be applied as the stroke for the shape
      Gibt zurück:
      this builder instance
    • stroke

      public NN stroke(com.dua3.utility.data.Color stroke)
      Sets the stroke paint property for the shape being built.
      Parameter:
      stroke - the Paint to be applied as the stroke for the shape
      Gibt zurück:
      this builder instance
    • bindStrokeFx

      public NN bindStrokeFx(ObservableValue<Paint> stroke)
      Binds the stroke property of the node being built to the specified ObservableValue. This ensures that the stroke property dynamically updates to reflect the value of the observable.
      Parameter:
      stroke - the ObservableValue to bind to the node's stroke property
      Gibt zurück:
      the current instance of the builder
    • bindStroke

      public NN bindStroke(ObservableValue<com.dua3.utility.data.Color> stroke)
      Binds the stroke property of the node being built to the specified ObservableValue. This ensures that the stroke property dynamically updates to reflect the value of the observable.
      Parameter:
      stroke - the ObservableValue to bind to the node's stroke property
      Gibt zurück:
      the current instance of the builder