org.nees.util.chef
Class HierarchicalDisplayItem

java.lang.Object
  extended byorg.nees.util.chef.HierarchicalDisplayItem

public class HierarchicalDisplayItem
extends java.lang.Object

Represents a HierarchicalObject for the purposes of displaying it in a HierarchicalDisplayList. Keeps track of the object's depth in the hierarchy, whether it's selected, and whether or not it's open.

Typical Usage:

Constructed by passing it a HierarchicalObject. Aside from the methods this class provides, the HierarchicalObject's own properties can be accessed by calling getObject and invoking its methods.


Constructor Summary
HierarchicalDisplayItem(HierarchicalObject o)
           
 
Method Summary
 int getDepth()
          Get the depth in the hierarchy.
 HierarchicalObject getObject()
          Get the delegate HierarchicalObject.
 boolean isOpen()
          Get whether or not the item is open.
 boolean isSelected()
          Return whether or not this item is selected.
 void setDepth(int value)
          Set the depth in the hierarchy.
 void setObject(HierarchicalObject o)
          Set the delegate HierarchicalObject.
 void setOpen(boolean value)
          Set whether or not the item is open.
 void setSelected(boolean sel)
          Set whether or not this item is selected.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HierarchicalDisplayItem

public HierarchicalDisplayItem(HierarchicalObject o)
Method Detail

getObject

public HierarchicalObject getObject()
Get the delegate HierarchicalObject.

Returns:
the delegate HierarchicalObject.

setObject

public void setObject(HierarchicalObject o)
Set the delegate HierarchicalObject.


setSelected

public void setSelected(boolean sel)
Set whether or not this item is selected.

Parameters:
sel - true if selected, false if not

isSelected

public boolean isSelected()
Return whether or not this item is selected.

Returns:
whether or not this item is selected.

getDepth

public int getDepth()
Get the depth in the hierarchy.

Returns:
the depth in the hierarchy

setDepth

public void setDepth(int value)
Set the depth in the hierarchy.

Parameters:
value - the new depth in the hierarchy

isOpen

public boolean isOpen()
Get whether or not the item is open.

Returns:
whether or not the item is open.

setOpen

public void setOpen(boolean value)
Set whether or not the item is open.

Parameters:
value - whether or not the item is open.