All Packages Class Hierarchy This Package Previous Next Index
Class improv.util.NestedList
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.List
|
+----improv.util.NestedList
- public final class NestedList
- extends List
A NestedList presents the user with a collapsable hierarchical list.
This is currently a wrapper on the simple AWT List, which is used to display
the list.
-
NestedList(int)
- constructs a list manager for a particular AWT List object
-
addItem(Object, int, Object, String)
-
Adds a new entry with a key value -key- beneath the parent entry
identified by -parentKey-.
-
addItem(Object, Object, String)
- Add a new entry to the list at the end position.
-
addItem(Object, String)
-
Add a new top-level entry to the list, identified by the object -key-,
with the given label -label-.
-
clear()
-
-
collapse(Object)
- Collapse a list
-
elementAt(int)
-
-
expand(Object)
- Expand a list
-
getLabel(Object)
-
-
getParent(Object)
-
-
getSelection()
-
-
getVisible(Object)
- Gets the visibility of an object in the list
-
hasChildren(Object)
-
-
indexOf(Object)
-
-
insertAfter(Object, Object, String)
- Add a new entry just after the entry identified by prevKey (i.e.
-
isExpanded(Object)
-
Find out if an object in the list should display its sub-objects
-
isPresent(Object)
-
-
refresh()
- refreshes the contents of a list
-
remove(Object)
- Removes an object from the list.
-
setChildrenVisible(Object, boolean)
-
Specifies if an object in the list should display its sub-objects
-
setLabel(Object, String)
- Sets the label used for a particular list object
-
setSelection(Object)
- Select an object in the list (nothing happens if the
object is not visible or is not in the list)
-
setVisible(Object, boolean)
- Sets the visibility of an object in the list
NestedList
public NestedList(int numcols)
- constructs a list manager for a particular AWT List object
addItem
public void addItem(Object parentKey,
int pos,
Object key,
String label)
- Adds a new entry with a key value -key- beneath the parent entry
identified by -parentKey-. The string -label- is the label to use for
the entry.
addItem
public void addItem(Object key,
String label)
- Add a new top-level entry to the list, identified by the object -key-,
with the given label -label-.
addItem
public void addItem(Object parent,
Object key,
String label)
- Add a new entry to the list at the end position.
insertAfter
public void insertAfter(Object prevKey,
Object key,
String label)
- Add a new entry just after the entry identified by prevKey (i.e.
at the same level as prevKey).
remove
public void remove(Object key)
- Removes an object from the list. Does nothing if the
object is not in the list.
clear
public void clear()
- Overrides:
- clear in class List
setLabel
public void setLabel(Object key,
String label)
- Sets the label used for a particular list object
getLabel
public String getLabel(Object key)
- Returns:
- the label used for a particular list object
getParent
public Object getParent(Object key)
- Returns:
- the 'parent' key of an object in the list, or null
if the object has no parent.
hasChildren
public boolean hasChildren(Object key)
- Returns:
- true if a given key is in the list, and there are
nested children beneath the key.
getSelection
public Object getSelection()
- Returns:
- which object is selected in the list
setSelection
public void setSelection(Object key)
- Select an object in the list (nothing happens if the
object is not visible or is not in the list)
isExpanded
public boolean isExpanded(Object key)
- Find out if an object in the list should display its sub-objects
setChildrenVisible
public void setChildrenVisible(Object key,
boolean value)
- Specifies if an object in the list should display its sub-objects
expand
public void expand(Object key)
- Expand a list
collapse
public void collapse(Object key)
- Collapse a list
getVisible
public boolean getVisible(Object key)
- Gets the visibility of an object in the list
setVisible
public void setVisible(Object key,
boolean value)
- Sets the visibility of an object in the list
isPresent
public boolean isPresent(Object key)
- Returns:
- true if a particular object is in the list.
elementAt
public Object elementAt(int position)
- Returns:
- the object at a given list position
indexOf
public int indexOf(Object key)
- Returns:
- the list position for a given key
refresh
public void refresh()
- refreshes the contents of a list
All Packages Class Hierarchy This Package Previous Next Index