org.nees.util.chef
Class HierarchicalDisplayList

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byjava.util.Vector
              extended byorg.nees.util.chef.HierarchicalDisplayList
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.util.List, java.util.RandomAccess, java.io.Serializable

public class HierarchicalDisplayList
extends java.util.Vector

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
HierarchicalDisplayList()
           
 
Method Summary
 void close(int position)
          Close the item with the given index
 boolean contains(java.lang.Object o)
          Is the application-specific object in question in this list?
 HierarchicalDisplayItem getItem(int i)
           
 HierarchicalDisplayItem[] getItems()
           
 int indexOf(java.lang.Object o)
          Return the list index of an application-specific object
 void open(int position)
          Open the item at the given index
 int parentIndexOf(int index)
          Return the index of the parent item of the given item.
 void removeItem(int index)
          Remove an item, and its children, if it's open.
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Constructor Detail

HierarchicalDisplayList

public HierarchicalDisplayList()
Method Detail

getItem

public HierarchicalDisplayItem getItem(int i)

getItems

public HierarchicalDisplayItem[] getItems()

open

public void open(int position)
Open the item at the given index

Parameters:
position - the index of the item to open

close

public void close(int position)
Close the item with the given index

Parameters:
position - the index of the item to close

contains

public boolean contains(java.lang.Object o)
Is the application-specific object in question in this list?

Returns:
true if the object exists in the list, false otherwise.

indexOf

public int indexOf(java.lang.Object o)
Return the list index of an application-specific object

Returns:
The index of the object, or -1 if it isn't in the list.

removeItem

public void removeItem(int index)
Remove an item, and its children, if it's open.

Parameters:
index - the index of the item to remove.

parentIndexOf

public int parentIndexOf(int index)
Return the index of the parent item of the given item.

Parameters:
index - the index of the item to remove.
Returns:
the index of the parent item, or -1 if not found.