Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.gnu.glib.Struct
org.gnu.glib.GObject
public class GObject
extends Struct
Field Summary | |
protected boolean |
|
Constructor Summary | |
| |
Method Summary | |
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
void |
|
static void |
|
protected void |
|
void |
|
boolean |
|
Object |
|
protected static Object | |
double |
|
Class |
|
EventType |
|
float |
|
static GObject |
|
protected static int |
|
int |
|
Object |
|
long |
|
Value |
|
protected static String |
|
String |
|
boolean |
|
protected static Object |
|
void |
|
void |
|
void |
|
protected GObject |
|
void |
|
void |
|
protected static void | |
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
Methods inherited from class org.gnu.glib.Struct | |
equals , getHandle , getNullHandle , hashCode , setHandle |
protected GObject()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Create an uninitialized instance. This has potential uses for derived classes.
public GObject(Handle handle)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Create a new GObject with a handle to a native resource returned from a call to the native libraries.
- Parameters:
handle
- The handle that represents a pointer to a native resource.
public GObject(Type type)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Create a new GObject of the given type.
public int addEventHandler(String name, Object cbrecv)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Connect an event to a callback method that has the same name as the event. For example, the event "clicked" will be mapped to a method "clicked()" in the object cbrecv.
- Parameters:
name
- The name of the event to map.cbrecv
- The name of the object that is to recieve the event.
- Returns:
- The handle id of the event that can be used in a call to removeEventHandler.
public int addEventHandler(String name, Object cbrecv, Object data)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Connect a event to a callback method that has the same name as the event. For example, the event "clicked" will be mapped to a method "clicked()" in the object cbrecv.
- Parameters:
name
- The name of the event to map.cbrecv
- The name of the object that is to recieve the event.data
- User defined data that will be passed to the callback.
- Returns:
- The handle id of the event that can be used in a call to removeEventHandler.
public int addEventHandler(String name, String func, Class cbrecv)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Connect a event to a static callback method "func" in Class "cbrecv".
- Parameters:
name
- The name of the event to map.func
- The name of the static callback method.cbrecv
- The name of the class that is to recieve the event.
- Returns:
- The handle id of the event that can be used in a call to removeEventHandler.
public int addEventHandler(String name, String func, Class cbrecv, Object data)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Connect a event to a static callback method "func" in Class "cbrecv".
- Parameters:
name
- The name of the event to map.func
- The name of the static callback method.cbrecv
- The name of the class that is to recieve the event.data
- User defined data that will be passed to the callback.
- Returns:
- The handle id of the event that can be used in a call to removeEventHandler.
public int addEventHandler(String name, String func, Object cbrecv)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Connect a event to a callback method "func" in object "cbrecv".
- Parameters:
name
- The name of the event to map.func
- The name of the callback method.cbrecv
- The name of the object that is to recieve the event.
- Returns:
- The handle id of the event that can be used in a call to removeEventHandler.
public int addEventHandler(String name, String func, Object cbrecv, Object data)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Connect a event to a callback method "func" in object "cbrecv".
- Parameters:
name
- The name of the event to map.func
- The name of the callback method.cbrecv
- The name of the object that is to recieve the event.data
- User defined data that will be passed to the callback.
- Returns:
- The handle id of the event that can be used in a call to removeEventHandler.
public int addEventHandler(String name, String func, Object cbrecv, boolean shouldCopyIfBoxed)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Connect a event to a callback method "func" in object "cbrecv".
- Parameters:
name
- The name of the event to map.func
- The name of the callback method.cbrecv
- The name of the object that is to recieve the event.shouldCopyIfBoxed
- Should copy the incoming object associated with the signal. Only for type Boxed.
- Returns:
- The handle id of the event that can be used in a call to removeEventHandler.
public void addListener(PropertyNotificationListener listen)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Add a listener that will be activated when a property is updated updated ("notify" signal). The notify signal is emitted on an object when one of its properties has been changed. Note that getting this signal doesn't guarantee that the value of the property has actually changed, it may also be emitted when the setter for the property is called to reinstate the previous value.
public static final void collect()
protected void finalize() throws Throwable
public void freezeNotify()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Stops emission of "notify" signals on object. The signals are queued untilthawNotify()
is called. This is necessary for accessors that modify multiple properties to prevent premature notification while the object is still being modified.
public boolean getBooleanProperty(String name)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Convenience method for retrieving boolean properties.
- Parameters:
name
- The name of the property to retrieve.
- Returns:
- The value of the given property.
public Object getData(String key)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Gets the Java Object associated with the given key from this object's object association table.
- Parameters:
key
- The association key.
- Returns:
- The Java Object associated with this key or null if the named association key does not exist.
- See Also:
setData(String,Object)
public double getDoubleProperty(String name)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Convenience method for retrieving double properties.
- Parameters:
name
- The name of the property to retrieve.
- Returns:
- The value of the given property.
public Class getEventListenerClass(String signal)
public float getFloatProperty(String name)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Convenience method for retrieving float properties.
- Parameters:
name
- The name of the property to retrieve.
- Returns:
- The value of the given property.
public static GObject getGObjectFromHandle(Handle hndl)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Gets a GObject instance for the given Handle. If no Java object currently exists for the given Handle, this method will return null. You should then instantiate the required Java class using the class' handle-constructor. For example:// Get a Handle from somewhere (typically as a parameter to a method // used as a callback and invoked from the C JNI side). SomeGtkClass finalobj = null; GObject obj = GObject.getGObjectFromHandle(handle); if (obj == null) { finalobj = new SomeGtkClass(handle); } else { finalobj = (SomeGtkClass) obj; }NOTE: This is for internal use only and should never need to be used in application code.
protected static final int getIntFromHandle(Handle handle)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Return the int to which the nativeHandle
holds a pointer. The native Handle is assumed to hold a C pointer to an int ( gint* ). This method dereferences that pointer and returns the value to which it points as an integer.
- Parameters:
handle
- The native Handle holding a pointer to an int.
- Returns:
- The int that is pointed to by the native Handle.
public int getIntProperty(String name)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Convenience method for retrieving int properties.
- Parameters:
name
- The name of the property to retrieve.
- Returns:
- The value of the given property.
public Object getJavaObjectProperty(String name)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Convenience method for retrieving Object properties.
- Parameters:
name
- The name of the property to retrieve.
- Returns:
- The value of the given property.
public long getLongProperty(String name)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Convenience method for retrieving long properties.
- Parameters:
name
- The name of the property to retrieve.
- Returns:
- The value of the given property.
public Value getProperty(String name)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Get theValue
of the given property (name). If there is a GTK property with this name, the GTK property will be retrived. Otherwise, a Java-side property will be returned. NOTE: Prefer using one of the convenience methods over using this method directly.
- Parameters:
name
- The name of the property to retrieve.
- Returns:
- The value of the given property.
protected static final String getStringFromHandle(Handle handle)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Return the String to which the nativeHandle
holds a pointer. The native Handle is assumed to hold a C pointer to a String (char* ). This method dereferences that pointer and returns the value to which it points as a String.
- Parameters:
handle
- The native Handle holding a pointer to a String.
- Returns:
- The String that is pointed to by the native Handle.
public String getStringProperty(String name)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Convenience method for retrieving String properties.
- Parameters:
name
- The name of the property to retrieve.
- Returns:
- The value of the given property.
public boolean hasProperty(String name)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Determines if this object supports the given named property. First the GTK properties are checked, then, if no property with this name is found, the Java-side properties are checked.
- Parameters:
name
- The property to verify.
- Returns:
- True if the given name is a property of this object, false otherwise.
protected static final Object instantiateJGObjectFromGType(int type, Handle handle)
public void notify(String property_name)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Emits a "notify" signal for the given property. The property can be a GTK native property or a Java-side property. If no property exist by the given name, this method does nothing.
- Parameters:
property_name
- The name of a property installed on the class of this object.
public void removeEventHandler(int handler)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Disconnect a event from its' callback method.
- Parameters:
handler
- The handler id of the event. This is the value returned from a call to addEventHandler().
public void removeListener(PropertyNotificationListener listen)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Remove the given listener from those activated when a property is updated.
protected GObject retrieveGObject(Handle hndl)
Deprecated. This method is deprecated in favor of
getGObjectFromHandle(Handle)
.Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
- See Also:
getGObjectFromHandle(Handle)
public void setBooleanProperty(String name, boolean value)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Convenience method for setting boolean properties.
- Parameters:
name
- The name of the property to set.value
- The value to set in the property.
- See Also:
setProperty(String,Value)
public void setData(String key, Object data)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Sets an association from a String to a Java Object to be stored in the GTK object's table of associations. If the object already had an association with the given key, the old association will be destroyed.
- Parameters:
key
- The association key.data
- The Java Object to associate with the given key.
- See Also:
getData(String)
public void setDoubleProperty(String name, double value)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Convenience method for setting double properties.
- Parameters:
name
- The name of the property to set.value
- The value to set in the property.
- See Also:
setProperty(String,Value)
public void setFloatProperty(String name, float value)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Convenience method for setting float properties.
- Parameters:
name
- The name of the property to set.value
- The value to set in the property.
- See Also:
setProperty(String,Value)
public void setIntProperty(String name, int value)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Convenience method for setting int properties.
- Parameters:
name
- The name of the property to set.value
- The value to set in the property.
- See Also:
setProperty(String,Value)
public void setJavaObjectProperty(String name, Object value)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Convenience method for setting Object properties.
- Parameters:
name
- The name of the property to set.value
- The value to set in the property.
public void setLongProperty(String name, long value)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Convenience method for setting long properties.
- Parameters:
name
- The name of the property to set.value
- The value to set in the property.
- See Also:
setProperty(String,Value)
public void setProperty(String name, Value val)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Set the given property (name) with the givenValue
on this object. If there is a GTK property with this name, the GTK property will be set. Otherwise, a Java-side property will be set. NOTE: Prefer using one of the convenience methods over using this method directly.
- Parameters:
name
- The name of the property to set.val
- The value to set in the property.
public void setStringProperty(String name, String value)
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Convenience method for setting String properties.
- Parameters:
name
- The name of the property to set.value
- The value to set in the property.
- See Also:
setProperty(String,Value)
public void thawNotify()
Deprecated. Superceeded by java-gnome 4.0; a method along these lines may well exist in the new bindings, but if it does it likely has a different name or signature due to the shift to an algorithmic mapping of the underlying native libraries.
Reverts the effect of a previous call tofreezeNotify
. This causes all queued "notify" signals on object to be emitted.