public class QueryTreeModel extends Object implements TreeModel
The QueryTreeModel
class implements a
TreeModel
to abstract the contents of a query response as
a tree in order to provide support for a QueryTreeBrowser
.
TreeModel
Constructor and Description |
---|
QueryTreeModel(QueryInformationModel q,
AttributeList filter)
Construct a tree model with a root node on top.
|
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) |
String |
toString()
Dump the entire tree to a string.
|
void |
valueForPathChanged(TreePath path,
Object newValue) |
public QueryTreeModel(QueryInformationModel q, AttributeList filter) throws DicomException
Construct a tree model with a root node on top.
The root node is the name of the called AET in the query information model.
The contents are added as required by actually performing queries as nodes are expanded.
q
- the query information model to build the tree fromfilter
- the query request identifier as a list of DICOM attributesDicomException
- thrown if there are problems building the treepublic void addTreeModelListener(TreeModelListener tml)
addTreeModelListener
in interface TreeModel
tml
- public int getChildCount(Object parent)
getChildCount
in interface TreeModel
parent
- public int getIndexOfChild(Object parent, Object child)
getIndexOfChild
in interface TreeModel
parent
- child
- public boolean isLeaf(Object node)
public void removeTreeModelListener(TreeModelListener tml)
removeTreeModelListener
in interface TreeModel
tml
- public String toString()
Dump the entire tree to a string.
Performs a top-down traversal.
toString
in class Object
QueryTreeRecord.toString()
public void valueForPathChanged(TreePath path, Object newValue)
valueForPathChanged
in interface TreeModel
path
- newValue
-