Package org.gnome.gobject
Class Binding.Builder<B extends Binding.Builder<B>>
java.lang.Object
io.github.jwharm.javagi.gobject.Builder<B>
org.gnome.gobject.GObject.Builder<B>
org.gnome.gobject.Binding.Builder<B>
- Type Parameters:
B
- the type of the Builder that is returned
- All Implemented Interfaces:
BuilderInterface
- Enclosing class:
Binding
Inner class implementing a builder pattern to construct a GObject with
properties.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Finish building theBinding
object.setFlags
(Set<BindingFlags> flags) Flags to be used to control theGBinding
setFlags
(BindingFlags... flags) Flags to be used to control theGBinding
TheGObject
that should be used as the source of the bindingsetSourceProperty
(String sourceProperty) The name of the property ofGBinding
:source that should be used as the source of the binding.TheGObject
that should be used as the target of the bindingsetTargetProperty
(String targetProperty) The name of the property ofGBinding
:target that should be used as the target of the binding.Methods inherited from class org.gnome.gobject.GObject.Builder
onNotify
Methods inherited from class io.github.jwharm.javagi.gobject.Builder
addBuilderProperty, connect, connect, connectSignals, getArena, getNames, getValues
-
Constructor Details
-
Builder
protected Builder()Default constructor for aBuilder
object.
-
-
Method Details
-
build
Finish building theBinding
object. This will callGObject.withProperties(org.gnome.glib.Type, java.lang.String[], org.gnome.gobject.Value[])
to create a new GObject instance, which is then cast toBinding
.- Overrides:
build
in classGObject.Builder<B extends Binding.Builder<B>>
- Returns:
- a new instance of
Binding
with the properties that were set in the Builder object.
-
setFlags
Flags to be used to control theGBinding
- Parameters:
flags
- the value for theflags
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setSource
-
setSourceProperty
The name of the property ofGBinding
:source that should be used as the source of the binding.This should be in [canonical form][canonical-parameter-names] to get the best performance.
- Parameters:
sourceProperty
- the value for thesource-property
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setTarget
-
setTargetProperty
The name of the property ofGBinding
:target that should be used as the target of the binding.This should be in [canonical form][canonical-parameter-names] to get the best performance.
- Parameters:
targetProperty
- the value for thetarget-property
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-
setFlags
Flags to be used to control theGBinding
- Parameters:
flags
- the value for theflags
property- Returns:
- the
Builder
instance is returned, to allow method chaining
-