java-gnome version 4.0.19

org.gnome.glib
Class Object

Object
  extended by org.freedesktop.bindings.Pointer
      extended by org.freedesktop.bindings.Proxy
          extended by org.gnome.glib.Object
Direct Known Subclasses:
AcceleratorGroup, AccelMap, Action, ActionGroup, Application, Clipboard, Colormap, Context, Device, Display, DisplayManager, DragContext, Drawable, Engine, EntryBuffer, EntryCompletion, FileSystemHandle, Font, FontFace, FontFamily, FontMap, Fontset, Handle, Hyperlink, IconFactory, IconTheme, InputMethod, Layout, Notification, Object, Object, ObjectFactory, PageSetup, Pixbuf, PixbufAnimation, PixbufAnimationIter, PixbufLoader, PrintContext, Printer, PrintJob, PrintOperation, PrintSettings, RcStyle, RecentManager, Registry, Relation, RelationSet, Renderer, Screen, Settings, SizeGroup, StateSet, StatusIcon, Style, TextBuffer, TextMark, TextTag, TextTagTable, TreeModel, TreeSelection, UIManager, Util, Visual, WindowGroup, XML

public abstract class Object
extends org.freedesktop.bindings.Proxy

Base class of the object system used by GLib and libraries based on it, such as GTK.

This is the wrapper around GObject!

Methods here provide the mechanism to get and set "properties" on the underlying GObjects. As a deliberate design decision to ensure type safety, however, these are not exposed for public use. To offer a getter or setter for a property, a java-gnome subclass must expose an explicitly named method. For example, to set the righteous property, (assuming that the GObject in question has such a property, that it is writable, and that it takes a string), create a method like this:

 public void setRighteous(String value) {
     setPropertyString("righteous", value);
 }
 
The use of a String property name is, of course, insanely type-unsafe, which is why we don't expose it in our public API. Luckily, though, in general it is not necessary to use this at all, as most GObjects provide convenience methods for such things, and should be used in preference wherever available.

It is probably also worth noting that these code paths are less efficient by about 8:1 as a GValue must be constructed as a wrapper around the data for the property being set. While that's not too expensive in C, from Java (and from all other language bindings of GTK) it requires allocation and initialization of the wrapper structure which really is just throw away.

Since:
4.0.0
Author:
Andrew Cowie

Method Summary
 
Methods inherited from class org.freedesktop.bindings.Pointer
toString
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 



java-gnome