public class AttributeTree extends Object implements TreeModel
The AttributeTree class implements a
TreeModel to abstract the contents of a list of attributes as
a tree in order to provide support for a AttributeTreeBrowser.
For details of some of the methods implemented here see javax.swing.tree.TreeModel.
AttributeTreeBrowser,
AttributeTreeRecord| Constructor and Description |
|---|
AttributeTree(AttributeList list)
Construct an entire tree of attributes from an attribute list.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTreeModelListener(TreeModelListener tml) |
Object |
getChild(Object node,
int index) |
int |
getChildCount(Object parent) |
int |
getIndexOfChild(Object parent,
Object child) |
Object |
getRoot() |
boolean |
isLeaf(Object node) |
void |
removeTreeModelListener(TreeModelListener tml) |
void |
setSortByName(boolean sortByName)
Set the sort order to be alphabetical by attribute name, or numerical by group and element tag.
|
String |
toString()
Walk the entire tree and dump as a string.
|
void |
valueForPathChanged(TreePath path,
Object newValue) |
public AttributeTree(AttributeList list) throws DicomException
Construct an entire tree of attributes from an attribute list.
list - the list whose attributes to addDicomExceptionpublic int getIndexOfChild(Object parent, Object child)
getIndexOfChild in interface TreeModelparent - child - public int getChildCount(Object parent)
getChildCount in interface TreeModelparent - public boolean isLeaf(Object node)
public void valueForPathChanged(TreePath path, Object newValue)
valueForPathChanged in interface TreeModelpath - newValue - public void addTreeModelListener(TreeModelListener tml)
addTreeModelListener in interface TreeModeltml - public void removeTreeModelListener(TreeModelListener tml)
removeTreeModelListener in interface TreeModeltml - public String toString()
Walk the entire tree and dump as a string.
public void setSortByName(boolean sortByName)
Set the sort order to be alphabetical by attribute name, or numerical by group and element tag.
sortByName - true if sort alphabetically by attribute name