All Packages Class Hierarchy This Package Previous Next Index
Class com.sgi.sysadm.ui.treeView.ItemUserObject
java.lang.Object
|
+----com.sgi.sysadm.ui.treeView.ItemUserObject
- public class ItemUserObject
- extends Object
- implements TreeViewProperties
ItemUserObject is used as the user object on DefaultMutableTreeNodes
in the TreeViewPane JTree. It attaches an Item to each node in the
tree and handles coming up with a String for displaying each Item.
- See Also:
- TreeViewPane, JTree, DefaultMutableTreeNode
-
ItemUserObject(TreeContext, DefaultMutableTreeNode, Item, String, TreeCategoryListener)
- Construct an ItemUserObject.
-
dispose()
- Dereference IconRenderers and NameRenderers so we can be
garbage-collected.
-
getItem()
- Returns the Item currently being displayed
-
toString()
- Render our Item as a String.
ItemUserObject
public ItemUserObject(TreeContext tc,
DefaultMutableTreeNode node,
Item item,
String itemCategory,
TreeCategoryListener listener)
- Construct an ItemUserObject.
- Parameters:
- tc - TreeContext for display parameters.
- node - DefaultMutableTreeNode for this node and Item.
- item - Item to display. The Item can be null,
but then no icon or text will be shown. You can
use the setItem method to tell the
ItemUserObject that the Item has changed.
- itemCategory - The package-qualified name of the Category of the
Item to display.
- listener - The TreeCategoryListener maintaining the
children of this node.
getItem
public Item getItem()
- Returns the Item currently being displayed
toString
public String toString()
- Render our Item as a String. ItemTreeCellRenderer calls this
when we are to be drawn.
- Returns:
- String to display in JTree for our node.
- Overrides:
- toString in class Object
dispose
public void dispose()
- Dereference IconRenderers and NameRenderers so we can be
garbage-collected. Also stop our TreeCategoryListener from
listening and clean up any children.
All Packages Class Hierarchy This Package Previous Next Index