org.gnu.gtk

Class IconFactory


public class IconFactory
extends GObject

This object manages a collection of IconSet; an IconSet manages a set of variants of a particular icon. Icons in an IconFactory are named by a stock ID, which is a simple string identifying the icon.

Constructor Summary

IconFactory()
Construct a new IconFactory object.

Method Summary

void
addDefault()
Adds this IconFactory to the list of icon factories searched by Style.lookupIconSet.
void
addIconSet(String stockID, IconSet iconSet)
Add the given IconSet to this IconFactory.
static Type
getType()
Retrieve the runtime type used by the GLib library.
IconSet
lookupIconSet(String stockID)
Looks up stockID from the icon factory, returning an icon set if found.
void
removeDefault()
Removes this icon factory from the list of default icon factories.

Methods inherited from class org.gnu.glib.GObject

addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addListener, collect, freezeNotify, getBooleanProperty, getData, getDoubleProperty, getEventListenerClass, getEventType, getFloatProperty, getGObjectFromHandle, getIntProperty, getJavaObjectProperty, getLongProperty, getPixbufProperty, getProperty, getStringProperty, hasProperty, notify, removeEventHandler, removeListener, setBooleanProperty, setData, setDoubleProperty, setFloatProperty, setIntProperty, setJavaObjectProperty, setLongProperty, setPixbufProperty, setProperty, setStringProperty, thawNotify

Constructor Details

IconFactory

public IconFactory()
Construct a new IconFactory object.

Method Details

addDefault

public void addDefault()
Adds this IconFactory to the list of icon factories searched by Style.lookupIconSet. This means that objects that take stock IDs will be able to find the icons in this factory. There will normally be an IconFactory added for each library or application that comes with icons. The default icon factories can be overridden by themes.

addIconSet

public void addIconSet(String stockID,
                       IconSet iconSet)
Add the given IconSet to this IconFactory.
Parameters:
stockID - The icon name
iconSet - The IconSet to add to this factory.

getType

public static Type getType()
Retrieve the runtime type used by the GLib library.

lookupIconSet

public IconSet lookupIconSet(String stockID)
Looks up stockID from the icon factory, returning an icon set if found.
Parameters:
stockID - The stockID to use for the search
Returns:
The IconSet that matches the stockID or null if one is not found.

removeDefault

public void removeDefault()
Removes this icon factory from the list of default icon factories.