All Packages Class Hierarchy This Package Previous Next Index
Class com.sgi.sysadm.ui.IconRenderer
java.lang.Object
|
+----com.sgi.sysadm.ui.GenericItemRenderer
|
+----com.sgi.sysadm.ui.IconRenderer
- public abstract class IconRenderer
- extends GenericItemRenderer
A class that can turn an item into an Icon.
-
IconRenderer(String, ResourceStack, HostContext)
- Construct an IconRenderer for a particular Category.
-
addIconListener(String, Object, int, int, RenderedObjectListener)
- Adds a RenderedObjectListener to the renderer
-
createIcon(Item, int, int, Object)
- Create the Icon from an Item
-
createRenderedObject(Item, Object)
- A method to genererate an Icon
-
removeIconListener(String, RenderedObjectListener)
- Removes an RenderedObjectListener
IconRenderer
public IconRenderer(String fullCategoryName,
ResourceStack rs,
HostContext hc)
- Construct an IconRenderer for a particular Category.
- Parameters:
- fullCategoryName - The name of the Category that this
object should render items of.
- rs - A ResourceStack that is used to look up properties.
- hc - The HostContext that is used to obtain Categories.
- See Also:
- GenericItemRenderer
addIconListener
public void addIconListener(String itemSelector,
Object context,
int iconWidth,
int iconHeight,
RenderedObjectListener listener)
- Adds a RenderedObjectListener to the renderer
- Parameters:
- itemSelector - The item the listener is interested in
- context - An object that can control the renderer
- iconWidth - The width of the icon the listener wants
- iconHeight - The height of the icon the listener wants
- listener - The listener
removeIconListener
public void removeIconListener(String itemSelector,
RenderedObjectListener listener)
- Removes an RenderedObjectListener
- Parameters:
- itemSelector - The Item that the listener is no longer
interested in. The RenderedObjectListener
will continue to receive notification about
other Items that it has registered
interest in.
- listener - The listener.
createRenderedObject
protected Object createRenderedObject(Item item,
Object context)
- A method to genererate an Icon
- Parameters:
- item - The Item to base the icon on.
- context - The context to use to render the icon
- Overrides:
- createRenderedObject in class GenericItemRenderer
- See Also:
- createRenderedObject
createIcon
protected abstract Icon createIcon(Item item,
int width,
int height,
Object context)
- Create the Icon from an Item
- Parameters:
- item - The Item
- width - The desired width of the icon.
- height - The desired height of the icon.
- context - The context to use to render the icon.
- Returns:
- The Icon
All Packages Class Hierarchy This Package Previous Next Index