|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.metamatrix.common.tree.basic.BasicTreeView
public class BasicTreeView
| Constructor Summary | |
|---|---|
BasicTreeView(TreeNode root,
TreeNodeSource source)
|
|
| Method Summary | |
|---|---|
boolean |
allowsChild(TreeNode parent,
TreeNode potentialChild)
Determine whether the specified parent TreeNode may contain the specified child node. |
boolean |
allowsChildren(TreeNode node)
Determine whether the specified TreeNode may contain children. |
protected BasicTreeNode |
assertBasicTreeNode(TreeNode node)
|
static java.lang.String |
collectionToString(java.util.Collection objs)
|
UserTransaction |
createReadTransaction()
Create a new instance of a UserTransaction that may be used to read information. |
UserTransaction |
createWriteTransaction()
Create a new instance of a UserTransaction that may be used to write and/or update information. |
UserTransaction |
createWriteTransaction(java.lang.Object source)
Create a new instance of a UserTransaction that may be used to write and/or update information. |
java.util.List |
getChildren(TreeNode parent)
Obtain the set of entries that are considered the children of the specified TreeNode. |
java.util.Comparator |
getComparator()
Return the comparator used to order for children returned from this view. |
TreeNodeFilter |
getFilter()
Return the filter that is being used by this view. |
TreeNode |
getHome()
Obtain the TreeNode that represents the home for the view. |
int |
getIndexOfChild(TreeNode child)
|
java.util.Set |
getMarked()
Return the set of marked nodes for this view. |
TreeNode |
getParent(TreeNode node)
Determine the parent TreeNode for the specified node, or null if the specified node is a root. |
java.lang.String |
getPath(TreeNode node)
Obtain the abstract path for this TreeNode. |
PropertiedObjectEditor |
getPropertiedObjectEditor()
Return the propertied object editor for this view. |
java.util.List |
getPropertyDefinitions()
Get the definitions of the properties for the TreeNode instances returned from this view. |
protected TreeNode |
getRoot()
Returns the single root of this TreeView. |
java.util.List |
getRoots()
Returns the single root of this TreeNode system. |
java.lang.String |
getSeparator()
Obtain the character (as a String) that is used to separate names in a path sequence for the abstract path. |
char |
getSeparatorChar()
Obtain the character that is used to separate names in a path sequence for the abstract path. |
TreeNodeEditor |
getTreeNodeEditor()
Return the tree node editor for this view. |
protected TreeNodeSource |
getTreeNodeSource()
Returns the TreeNodeSource associated with this TreeView. |
boolean |
isAncestorOf(TreeNode ancestor,
TreeNode descendent)
Determine whether the specified node is a descendent of the given ancestor node. |
boolean |
isHidden(TreeNode node)
Determine whether the specified TreeNode is hidden. |
boolean |
isMarked(TreeNode node)
Return the marked state of the specified node. |
boolean |
isParentOf(TreeNode parent,
TreeNode child)
Determine whether the specified node is a child of the given parent node. |
boolean |
isRoot(TreeNode node)
Determine whether the specified TreeNode is a root of the underlying system. |
java.util.Iterator |
iterator()
Obtain an iterator for this whole view, which navigates the view's nodes using pre-order rules (i.e., it visits a node before its children). |
java.util.Iterator |
iterator(TreeNode startingPoint)
Obtain an iterator for the view starting at the specified node. |
java.util.Collection |
lookup(java.lang.String path)
Lookup the BasicTreeNode Object(s) referenced by the relative path in this view. |
void |
print(java.io.PrintStream stream)
|
void |
print(java.io.PrintStream stream,
boolean showMarked)
|
void |
setComparator(java.util.Comparator comparator)
Set the comparator that should be used to order the children. |
void |
setFilter(TreeNodeFilter filter)
Set the filter that limits the set of TreeNode instances returned from this view. |
void |
setMarked(TreeNode node,
boolean markedState)
Set the marked state of the specified entry. |
protected boolean |
setRoot(TreeNode root)
Set the single root used for this TreeView. |
void |
setSeparator(java.lang.String delimiter)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BasicTreeView(TreeNode root,
TreeNodeSource source)
| Method Detail |
|---|
protected BasicTreeNode assertBasicTreeNode(TreeNode node)
public void setFilter(TreeNodeFilter filter)
setFilter in interface TreeViewfilter - the filter, or null if the default "pass-through" filter should be used.public TreeNodeFilter getFilter()
getFilter in interface TreeViewpublic void setComparator(java.util.Comparator comparator)
setComparator in interface TreeViewcomparator - the comparator, or null if node path sorting should be used.public java.util.Comparator getComparator()
getComparator in interface TreeViewpublic java.util.Iterator iterator()
iterator in interface TreeViewpublic java.util.Iterator iterator(TreeNode startingPoint)
iterator in interface TreeViewstartingPoint - the root of the subtree over which the iterator
is to navigate; may not be null
public java.util.List getPropertyDefinitions()
getPropertyDefinitions in interface TreeViewpublic java.util.List getRoots()
getRoots in interface TreeViewpublic boolean isRoot(TreeNode node)
isRoot in interface TreeViewnode - the TreeNode instance that is to be checked; may not be null
public boolean allowsChildren(TreeNode node)
allowsChildren in interface TreeViewentry - the TreeNode instance that is to be checked; may
not be null
public boolean allowsChild(TreeNode parent,
TreeNode potentialChild)
allowsChild in interface TreeViewparent - the TreeNode instance that is to be the parent;
may not be nullpotentialChild - the TreeNode instance that is to be the child;
may not be null
public boolean isHidden(TreeNode node)
isHidden in interface TreeViewnode - the TreeNode instance that is to be checked; may not be null
public boolean isMarked(TreeNode node)
isMarked in interface TreeView
public void setMarked(TreeNode node,
boolean markedState)
setMarked in interface TreeViewtrue - if the node is to be marked, or false if it is to be un-marked.public java.util.Set getMarked()
getMarked in interface TreeViewthe - unmodifiable set of marked nodes; never nullpublic TreeNode getHome()
getHome in interface TreeViewpublic java.lang.String getPath(TreeNode node)
getPath in interface TreeViewpublic char getSeparatorChar()
getSeparatorChar in interface TreeViewpublic java.lang.String getSeparator()
getSeparator in interface TreeViewpublic void setSeparator(java.lang.String delimiter)
public TreeNode getParent(TreeNode node)
getParent in interface TreeViewnode - the TreeNode instance for which the parent is to be obtained;
may not be null
public java.util.List getChildren(TreeNode parent)
getChildren in interface TreeViewparent - the TreeNode instance for which the child entries
are to be obtained; may not be null
public boolean isParentOf(TreeNode parent,
TreeNode child)
isParentOf in interface TreeViewpublic int getIndexOfChild(TreeNode child)
public boolean isAncestorOf(TreeNode ancestor,
TreeNode descendent)
isAncestorOf in interface TreeViewpublic PropertiedObjectEditor getPropertiedObjectEditor()
getPropertiedObjectEditor in interface PropertiedObjectViewpublic TreeNodeEditor getTreeNodeEditor()
getTreeNodeEditor in interface TreeViewpublic UserTransaction createReadTransaction()
createReadTransaction in interface UserTransactionFactorypublic UserTransaction createWriteTransaction()
createWriteTransaction in interface UserTransactionFactorypublic UserTransaction createWriteTransaction(java.lang.Object source)
createWriteTransaction in interface UserTransactionFactorysource - the object that is considered to be the source of the transaction;
may be null
public java.util.Collection lookup(java.lang.String path)
This method ignores case.
path - the path of the desired node specified in terms of this view
(i.e., the result of calling getPath() on this view with the
returned node as the parameter should result in the same value as path);
may not be null or zero-length
java.lang.AssertionError - if the path is null or zero-lengthprotected TreeNode getRoot()
protected boolean setRoot(TreeNode root)
root - the TreeNode instance to be used as the root of this view.
protected TreeNodeSource getTreeNodeSource()
public void print(java.io.PrintStream stream)
public void print(java.io.PrintStream stream,
boolean showMarked)
public static java.lang.String collectionToString(java.util.Collection objs)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||