Class BuilderJavaScope
java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gobject.TypeInstance
org.gnome.gobject.GObject
org.gnome.gtk.BuilderCScope
org.javagi.gtk.BuilderJavaScope
- All Implemented Interfaces:
BuilderScope, Proxy
The
BuilderJavaScope class can be used with a GtkBuilder to
refer to Java instance methods from a ui file.
When a ui file contains, for example, the following element:
<signal name="clicked" handler="okButtonClicked"/>
the Java instance method okButtonClicked() will be called on
the widget that is being built with the GtkBuilder.
-
Nested Class Summary
Nested classes/interfaces inherited from class BuilderCScope
BuilderCScope.Builder<B>, BuilderCScope.BuilderCScopeClassNested classes/interfaces inherited from class GObject
GObject.NotifyCallback, GObject.ObjectClassNested classes/interfaces inherited from interface BuilderScope
BuilderScope.BuilderScope$Impl, BuilderScope.BuilderScopeInterface -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateClosure(GtkBuilder builder, String function, Set<BuilderClosureFlags> flags, GObject object) Called by a GtkBuilder to create aClosurefrom the name that was specified in an attribute of a UI file.getTypeFromFunction(GtkBuilder builder, String functionName) getTypeFromName(GtkBuilder builder, String typeName) Methods inherited from class BuilderCScope
addCallbackSymbol, addCallbackSymbols, asParent, builder, getMemoryLayout, getType, lookupCallbackSymbolMethods inherited from class 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, 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 TypeInstance
callParent, callParent, cast, getPrivate, readGClass, writeGClassMethods inherited from class ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
BuilderJavaScope
public BuilderJavaScope()Default constructor
-
-
Method Details
-
createClosure
public Closure createClosure(GtkBuilder builder, String function, Set<BuilderClosureFlags> flags, GObject object) throws GErrorException Called by a GtkBuilder to create aClosurefrom the name that was specified in an attribute of a UI file. Thefunctionshould refer to a method in the Java class (aBuildableinstance). If that fails, as a fallback mechanism theBuilderScope.createClosure(GtkBuilder, String, Set, GObject)is called and the result of that function is returned.- Specified by:
createClosurein interfaceBuilderScope- Parameters:
builder- the GtkBuilder instancefunction- the function name for which aClosurewill be returnedflags- options for creating the closureobject- unused- Returns:
- a new
JavaClosureinstance for the requestedfunction - Throws:
GErrorException- when an error occurs
-
getTypeFromFunction
- Specified by:
getTypeFromFunctionin interfaceBuilderScope- Parameters:
builder- the GtkBuilder instancefunctionName- the name of the function that will return a GType- Returns:
- the GType returned by
functionName
-
getTypeFromName
- Specified by:
getTypeFromNamein interfaceBuilderScope- Parameters:
builder- the GtkBuilder instancetypeName- the name of the GType- Returns:
- the requested GType
-