org.apache.pivot.wtk.content
Class TreeBranch
java.lang.Object
org.apache.pivot.wtk.content.TreeNode
org.apache.pivot.wtk.content.TreeBranch
- All Implemented Interfaces:
- Iterable<TreeNode>, org.apache.pivot.collections.Collection<TreeNode>, org.apache.pivot.collections.List<TreeNode>, org.apache.pivot.collections.Sequence<TreeNode>
public class TreeBranch
- extends TreeNode
- implements org.apache.pivot.collections.List<TreeNode>
Default tree branch implementation.
| Nested classes/interfaces inherited from interface org.apache.pivot.collections.List |
org.apache.pivot.collections.List.ItemIterator<T>, org.apache.pivot.collections.List.ListListenerList<T> |
| Nested classes/interfaces inherited from interface org.apache.pivot.collections.Sequence |
org.apache.pivot.collections.Sequence.Tree<T> |
TreeBranch
public TreeBranch()
TreeBranch
public TreeBranch(Image icon)
TreeBranch
public TreeBranch(String text)
TreeBranch
public TreeBranch(Image icon,
String text)
TreeBranch
public TreeBranch(Image icon,
Image expandedIcon,
String text)
getExpandedIcon
public Image getExpandedIcon()
setExpandedIcon
public void setExpandedIcon(Image expandedIcon)
setExpandedIcon
public void setExpandedIcon(URL expandedIconURL)
- Sets the tree branch's expanded icon by URL.
If the icon already exists in the application context resource cache,
the cached value will be used. Otherwise, the icon will be loaded
synchronously and added to the cache.
- Parameters:
expandedIconURL - The location of the expanded icon to set.
setExpandedIcon
public void setExpandedIcon(String expandedIconName)
- Sets the tree branch's expanded icon by resource name.
- Parameters:
expandedIconName - The resource name of the expanded icon to set.- See Also:
setExpandedIcon(URL)
add
public int add(TreeNode treeNode)
- Specified by:
add in interface org.apache.pivot.collections.List<TreeNode>- Specified by:
add in interface org.apache.pivot.collections.Sequence<TreeNode>
insert
public void insert(TreeNode treeNode,
int index)
- Specified by:
insert in interface org.apache.pivot.collections.List<TreeNode>- Specified by:
insert in interface org.apache.pivot.collections.Sequence<TreeNode>
update
public TreeNode update(int index,
TreeNode treeNode)
- Specified by:
update in interface org.apache.pivot.collections.List<TreeNode>- Specified by:
update in interface org.apache.pivot.collections.Sequence<TreeNode>
remove
public int remove(TreeNode treeNode)
- Specified by:
remove in interface org.apache.pivot.collections.Sequence<TreeNode>
remove
public org.apache.pivot.collections.Sequence<TreeNode> remove(int index,
int count)
- Specified by:
remove in interface org.apache.pivot.collections.List<TreeNode>- Specified by:
remove in interface org.apache.pivot.collections.Sequence<TreeNode>
clear
public void clear()
- Specified by:
clear in interface org.apache.pivot.collections.Collection<TreeNode>- Specified by:
clear in interface org.apache.pivot.collections.List<TreeNode>
get
public TreeNode get(int index)
- Specified by:
get in interface org.apache.pivot.collections.Sequence<TreeNode>
indexOf
public int indexOf(TreeNode treeNode)
- Specified by:
indexOf in interface org.apache.pivot.collections.Sequence<TreeNode>
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty in interface org.apache.pivot.collections.Collection<TreeNode>
getLength
public int getLength()
- Specified by:
getLength in interface org.apache.pivot.collections.List<TreeNode>- Specified by:
getLength in interface org.apache.pivot.collections.Sequence<TreeNode>
getComparator
public Comparator<TreeNode> getComparator()
- Specified by:
getComparator in interface org.apache.pivot.collections.Collection<TreeNode>
setComparator
public void setComparator(Comparator<TreeNode> comparator)
- Specified by:
setComparator in interface org.apache.pivot.collections.Collection<TreeNode>- Specified by:
setComparator in interface org.apache.pivot.collections.List<TreeNode>
iterator
public Iterator<TreeNode> iterator()
- Specified by:
iterator in interface Iterable<TreeNode>
getListListeners
public org.apache.pivot.util.ListenerList<org.apache.pivot.collections.ListListener<TreeNode>> getListListeners()
- Specified by:
getListListeners in interface org.apache.pivot.collections.List<TreeNode>
toString
public String toString()
- Overrides:
toString in class TreeNode