Class Binding.Builder<B extends Binding.Builder<B>>

Type Parameters:
B - the type of the Builder that is returned
All Implemented Interfaces:
BuilderInterface
Enclosing class:
Binding

public static class Binding.Builder<B extends Binding.Builder<B>> extends GObject.Builder<B>
Inner class implementing a builder pattern to construct a GObject with properties.
Since:
2.26
  • Constructor Details

    • Builder

      protected Builder()
      Default constructor for a Builder object.
  • Method Details

    • build

      public Binding build()
      Finish building the Binding object. This will call GObject.withProperties(Type, String[], Value[]) to create a new GObject instance, which is then cast to Binding.
      Overrides:
      build in class GObject.Builder<B extends Binding.Builder<B>>
      Returns:
      a new instance of Binding with the properties that were set in the Builder object.
    • setFlags

      public B setFlags(Set<BindingFlags> flags)
      Flags to be used to control the GBinding
      Parameters:
      flags - the value for the flags property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.26
    • setSource

      public B setSource(GObject source)
      The GObject that should be used as the source of the binding
      Parameters:
      source - the value for the source property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.26
    • setSourceProperty

      public B setSourceProperty(String sourceProperty)

      The name of the property of GBinding:source that should be used as the source of the binding.

      This should be in GObject.ParamSpec#parameter-names to get the best performance.

      Parameters:
      sourceProperty - the value for the source-property property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.26
    • setTarget

      public B setTarget(GObject target)
      The GObject that should be used as the target of the binding
      Parameters:
      target - the value for the target property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.26
    • setTargetProperty

      public B setTargetProperty(String targetProperty)

      The name of the property of GBinding:target that should be used as the target of the binding.

      This should be in GObject.ParamSpec#parameter-names to get the best performance.

      Parameters:
      targetProperty - the value for the target-property property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.26
    • setFlags

      public B setFlags(BindingFlags... flags)
      Flags to be used to control the GBinding
      Parameters:
      flags - the value for the flags property
      Returns:
      the Builder instance is returned, to allow method chaining
      Since:
      2.26