Class BindingGroup
- All Implemented Interfaces:
Proxy
GBindingGroup can be used to bind multiple properties
from an object collectively.
Use the various methods to bind properties from a single source
object to multiple destination objects. Properties can be bound
bidirectionally and are connected when the source object is set
with setSource(org.gnome.gobject.GObject).
- Since:
- 2.72
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBindingGroup.Builder<B extends BindingGroup.Builder<B>>Inner class implementing a builder pattern to construct a GObject with properties.Nested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClass -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new BindingGroup.BindingGroup(MemorySegment address) Create a BindingGroup proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected BindingGroupasParent()Returns this instance as if it were its parent type.voidCreates a binding betweensourcePropertyon the source object andtargetPropertyontarget.Whenever thesourcePropertyis changed thetargetPropertyis updated using the same value.voidbind(String sourceProperty, GObject target, String targetProperty, BindingFlags... flags) Creates a binding betweensourcePropertyon the source object andtargetPropertyontarget.Whenever thesourcePropertyis changed thetargetPropertyis updated using the same value.voidbindFull(String sourceProperty, GObject target, String targetProperty, Set<BindingFlags> flags, @Nullable BindingTransformFunc transformTo, @Nullable BindingTransformFunc transformFrom) Creates a binding betweensourcePropertyon the source object andtargetPropertyontarget,allowing you to set the transformation functions to be used by the binding.voidbindFull(String sourceProperty, GObject target, String targetProperty, BindingFlags flags, @Nullable BindingTransformFunc transformTo, @Nullable BindingTransformFunc transformFrom) Creates a binding betweensourcePropertyon the source object andtargetPropertyontarget,allowing you to set the transformation functions to be used by the binding.voidbindWithClosures(String sourceProperty, GObject target, String targetProperty, Set<BindingFlags> flags, @Nullable Closure transformTo, @Nullable Closure transformFrom) Creates a binding betweensourcePropertyon the source object andtargetPropertyontarget,allowing you to set the transformation functions to be used by the binding.voidbindWithClosures(String sourceProperty, GObject target, String targetProperty, BindingFlags flags, @Nullable Closure transformTo, @Nullable Closure transformFrom) Creates a binding betweensourcePropertyon the source object andtargetPropertyontarget,allowing you to set the transformation functions to be used by the binding.static BindingGroup.Builder<? extends BindingGroup.Builder> builder()ABindingGroup.Builderobject constructs aBindingGroupwith the specified properties.@Nullable GObjectGets the source object used for binding properties.static @Nullable TypegetType()Get the GType of the BindingGroup classvoidSetssourceas the source object used for creating property bindings.Methods inherited from class org.gnome.gobject.GObject
addToggleRef, addWeakPointer, bindProperty, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, connect, constructed, disconnect, dispatchPropertiesChanged, dispose, dupData, dupQdata, emit, emitNotify, finalize_, forceFloating, freezeNotify, get, getData, getMemoryLayout, getProperty, getProperty, getProperty, getQdata, getv, interfaceFindProperty, interfaceInstallProperty, interfaceListProperties, isFloating, newInstance, newInstance, newv, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, removeWeakPointer, replaceData, replaceQdata, runDispose, set, setData, setDataFull, setProperty, setProperty, setProperty, setQdata, setQdataFull, setv, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref, withPropertiesMethods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, cast, getPrivate, readGClass, writeGClassMethods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
BindingGroup
Create a BindingGroup proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
BindingGroup
public BindingGroup()Creates a new BindingGroup.
-
-
Method Details
-
getType
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuperkeyword, but will set the native typeclass function pointers to the parent type. When overriding a native virtual method in Java, "chaining up" withsuper.methodName()doesn't work, because it invokes the overridden function pointer again. To chain up, callasParent().methodName(). This will call the native function pointer of this virtual method in the typeclass of the parent type. -
bind
public void bind(String sourceProperty, GObject target, String targetProperty, Set<BindingFlags> flags) Creates a binding betweensourcePropertyon the source object andtargetPropertyontarget.Whenever thesourcePropertyis changed thetargetPropertyis updated using the same value. The binding flagBindingFlags.SYNC_CREATEis automatically specified.See g_object_bind_property() for more information.
- Parameters:
sourceProperty- the property on the source to bindtarget- the targetGObjecttargetProperty- the property ontargetto bindflags- the flags used to create theGBinding- Since:
- 2.72
-
bind
public void bind(String sourceProperty, GObject target, String targetProperty, BindingFlags... flags) Creates a binding betweensourcePropertyon the source object andtargetPropertyontarget.Whenever thesourcePropertyis changed thetargetPropertyis updated using the same value. The binding flagBindingFlags.SYNC_CREATEis automatically specified.See g_object_bind_property() for more information.
- Parameters:
sourceProperty- the property on the source to bindtarget- the targetGObjecttargetProperty- the property ontargetto bindflags- the flags used to create theGBinding- Since:
- 2.72
-
bindFull
public void bindFull(String sourceProperty, GObject target, String targetProperty, Set<BindingFlags> flags, @Nullable BindingTransformFunc transformTo, @Nullable BindingTransformFunc transformFrom) Creates a binding betweensourcePropertyon the source object andtargetPropertyontarget,allowing you to set the transformation functions to be used by the binding. The binding flagBindingFlags.SYNC_CREATEis automatically specified.See g_object_bind_property_full() for more information.
- Parameters:
sourceProperty- the property on the source to bindtarget- the targetGObjecttargetProperty- the property ontargetto bindflags- the flags used to create theGBindingtransformTo- the transformation function from the source object to thetarget,ornullto use the defaulttransformFrom- the transformation function from thetargetto the source object, ornullto use the default- Since:
- 2.72
-
bindFull
public void bindFull(String sourceProperty, GObject target, String targetProperty, BindingFlags flags, @Nullable BindingTransformFunc transformTo, @Nullable BindingTransformFunc transformFrom) Creates a binding betweensourcePropertyon the source object andtargetPropertyontarget,allowing you to set the transformation functions to be used by the binding. The binding flagBindingFlags.SYNC_CREATEis automatically specified.See g_object_bind_property_full() for more information.
- Parameters:
sourceProperty- the property on the source to bindtarget- the targetGObjecttargetProperty- the property ontargetto bindflags- the flags used to create theGBindingtransformTo- the transformation function from the source object to thetarget,ornullto use the defaulttransformFrom- the transformation function from thetargetto the source object, ornullto use the default- Since:
- 2.72
-
bindWithClosures
public void bindWithClosures(String sourceProperty, GObject target, String targetProperty, Set<BindingFlags> flags, @Nullable Closure transformTo, @Nullable Closure transformFrom) Creates a binding betweensourcePropertyon the source object andtargetPropertyontarget,allowing you to set the transformation functions to be used by the binding. The binding flagBindingFlags.SYNC_CREATEis automatically specified.This function is the language bindings friendly version of g_binding_group_bind_property_full(), using
GClosuresinstead of function pointers.See g_object_bind_property_with_closures() for more information.
- Parameters:
sourceProperty- the property on the source to bindtarget- the targetGObjecttargetProperty- the property ontargetto bindflags- the flags used to create theGBindingtransformTo- aGClosurewrapping the transformation function from the source object to thetarget,ornullto use the defaulttransformFrom- aGClosurewrapping the transformation function from thetargetto the source object, ornullto use the default- Since:
- 2.72
-
bindWithClosures
public void bindWithClosures(String sourceProperty, GObject target, String targetProperty, BindingFlags flags, @Nullable Closure transformTo, @Nullable Closure transformFrom) Creates a binding betweensourcePropertyon the source object andtargetPropertyontarget,allowing you to set the transformation functions to be used by the binding. The binding flagBindingFlags.SYNC_CREATEis automatically specified.This function is the language bindings friendly version of g_binding_group_bind_property_full(), using
GClosuresinstead of function pointers.See g_object_bind_property_with_closures() for more information.
- Parameters:
sourceProperty- the property on the source to bindtarget- the targetGObjecttargetProperty- the property ontargetto bindflags- the flags used to create theGBindingtransformTo- aGClosurewrapping the transformation function from the source object to thetarget,ornullto use the defaulttransformFrom- aGClosurewrapping the transformation function from thetargetto the source object, ornullto use the default- Since:
- 2.72
-
dupSource
Gets the source object used for binding properties.- Returns:
- a
GObjectornull. - Since:
- 2.72
-
setSource
Setssourceas the source object used for creating property bindings. If there is already a source object all bindings from it will be removed.Note that all properties that have been bound must exist on
source.- Parameters:
source- the sourceGObject, ornullto clear it- Since:
- 2.72
-
builder
ABindingGroup.Builderobject constructs aBindingGroupwith the specified properties. Use the variousset...()methods to set properties, and finish construction withBindingGroup.Builder.build().- Returns:
- the builder object
-