All Packages Class Hierarchy This Package Previous Next Index
Class com.sgi.sysadm.ui.GenericItemRenderer
java.lang.Object
|
+----com.sgi.sysadm.ui.GenericItemRenderer
- public abstract class GenericItemRenderer
- extends Object
A class that can turn an Item into something else (For example a
String or a Icon). Exactly what the Item is turned into is
determined by subclasses.
-
CATEGORY_ONLY
- A string that is passed as itemSelector to
addRenderedObjectListener and
removeRenderedObjectListener
to signal that the caller is requesting that the rendered
object contain information about the Category in general,
instead of a particular Item.
-
ITEM_TABLE
- A Object that is passed as context to
createRenderedObject when the Item is being rendered
for an ItemTable.
-
ITEM_VIEW
- A Object that is passed as context to
createRenderedObject when the Item is being rendered
for an ItemView.
-
RESULT_VIEW
- A Object that is passed as context to
createRenderedObject when the Item is being rendered
for an ResultView.
-
TREE_NODE
- A Object that is passed as context to
createRenderedObject when the Item is being rendered
for a TreeView.
-
GenericItemRenderer(String, ResourceStack, HostContext)
- The constructor.
-
addRenderedObjectListener(String, RenderedObjectListener, Object)
- Adds a RenderedObjectListener to the renderer
-
createRenderedObject(Item, Object)
- A method to generate the rendered object
-
getFullCategoryName()
-
-
getResourceStack()
-
-
notifyListeners(Item, boolean)
- Notifies the listeners that the rendered object has changed
-
removeRenderedObjectListener(String, RenderedObjectListener)
- Removes a RenderedObjectListener
ITEM_VIEW
public static final Object ITEM_VIEW
- A Object that is passed as context to
createRenderedObject when the Item is being rendered
for an ItemView.
RESULT_VIEW
public static final Object RESULT_VIEW
- A Object that is passed as context to
createRenderedObject when the Item is being rendered
for an ResultView.
ITEM_TABLE
public static final Object ITEM_TABLE
- A Object that is passed as context to
createRenderedObject when the Item is being rendered
for an ItemTable.
TREE_NODE
public static final Object TREE_NODE
- A Object that is passed as context to
createRenderedObject when the Item is being rendered
for a TreeView.
CATEGORY_ONLY
public static final String CATEGORY_ONLY
- A string that is passed as itemSelector to
addRenderedObjectListener and
removeRenderedObjectListener
to signal that the caller is requesting that the rendered
object contain information about the Category in general,
instead of a particular Item.
GenericItemRenderer
protected GenericItemRenderer(String fullCategoryName,
ResourceStack rs,
HostContext hc)
- The constructor. The arguments passed to this constructor are
stored in protected member variables for use by subclasses.
- Parameters:
- fullCategoryName - The name of the Category that this
should render Items of.
- rs - A ResourceStack that is used to look up properties.
- hc - The HostContext that is used to obtain Categories.
addRenderedObjectListener
protected void addRenderedObjectListener(String itemSelector,
RenderedObjectListener listener,
Object context)
- Adds a RenderedObjectListener to the renderer
- Parameters:
- itemSelector - The Item the listener is interested in.
The caller can pass CATEGORY_ONLY to
indicate that it is interested in the
Category, rather than a particular Item.
- listener - The listener
- context - An Object that is passed to the renderer to
control how the object is to be rendered. The
GenericItemRenderer subclass and the caller of
this method can create a protocol about how the
context will be used. When the
infrastructure uses ItemRenderers, it uses
ITEM_VIEW, RESULT_VIEW, ITEM_TABLE, and TREE_NODE as
contexts.
- See Also:
- CATEGORY_ONLY, ITEM_VIEW, RESULT_VIEW, ITEM_TABLE, TREE_NODE
removeRenderedObjectListener
protected void removeRenderedObjectListener(String itemSelector,
RenderedObjectListener listener)
- Removes a RenderedObjectListener
- Parameters:
- itemSelector - The Item that the listener is no longer
interested in. The listener will continue
to receive notification about other Items
that it has registered interest
in. CATEGORY_ONLY is a legal value, if it
was passed to a corresponding
addRenderedObjectListener call.
- listener - The listener to remove.
- See Also:
- CATEGORY_ONLY
notifyListeners
protected void notifyListeners(Item item,
boolean removed)
- Notifies the listeners that the rendered object has changed
- Parameters:
- item - The Item that changed
- removed - true if the Item has been deleted, else false
createRenderedObject
protected abstract Object createRenderedObject(Item item,
Object context)
- A method to generate the rendered object
- Parameters:
- item - The Item to base the object on.
- context - The context to use to render the object.
getResourceStack
protected ResourceStack getResourceStack()
- Returns:
- The renderer's ResourceStack.
getFullCategoryName
protected String getFullCategoryName()
- Returns:
- The full name of the Category for which items are being
rendered.
All Packages Class Hierarchy This Package Previous Next Index