|
||||||||||
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 TreeView
filter
- the filter, or null if the default "pass-through" filter should be used.public TreeNodeFilter getFilter()
getFilter
in interface TreeView
public void setComparator(java.util.Comparator comparator)
setComparator
in interface TreeView
comparator
- the comparator, or null if node path sorting should be used.public java.util.Comparator getComparator()
getComparator
in interface TreeView
public java.util.Iterator iterator()
iterator
in interface TreeView
public java.util.Iterator iterator(TreeNode startingPoint)
iterator
in interface TreeView
startingPoint
- the root of the subtree over which the iterator
is to navigate; may not be null
public java.util.List getPropertyDefinitions()
getPropertyDefinitions
in interface TreeView
public java.util.List getRoots()
getRoots
in interface TreeView
public boolean isRoot(TreeNode node)
isRoot
in interface TreeView
node
- the TreeNode instance that is to be checked; may not be null
public boolean allowsChildren(TreeNode node)
allowsChildren
in interface TreeView
entry
- the TreeNode instance that is to be checked; may
not be null
public boolean allowsChild(TreeNode parent, TreeNode potentialChild)
allowsChild
in interface TreeView
parent
- 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 TreeView
node
- 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 TreeView
true
- if the node is to be marked, or false if it is to be un-marked.public java.util.Set getMarked()
getMarked
in interface TreeView
the
- unmodifiable set of marked nodes; never nullpublic TreeNode getHome()
getHome
in interface TreeView
public java.lang.String getPath(TreeNode node)
getPath
in interface TreeView
public char getSeparatorChar()
getSeparatorChar
in interface TreeView
public java.lang.String getSeparator()
getSeparator
in interface TreeView
public void setSeparator(java.lang.String delimiter)
public TreeNode getParent(TreeNode node)
getParent
in interface TreeView
node
- 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 TreeView
parent
- 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 TreeView
public int getIndexOfChild(TreeNode child)
public boolean isAncestorOf(TreeNode ancestor, TreeNode descendent)
isAncestorOf
in interface TreeView
public PropertiedObjectEditor getPropertiedObjectEditor()
getPropertiedObjectEditor
in interface PropertiedObjectView
public TreeNodeEditor getTreeNodeEditor()
getTreeNodeEditor
in interface TreeView
public UserTransaction createReadTransaction()
createReadTransaction
in interface UserTransactionFactory
public UserTransaction createWriteTransaction()
createWriteTransaction
in interface UserTransactionFactory
public UserTransaction createWriteTransaction(java.lang.Object source)
createWriteTransaction
in interface UserTransactionFactory
source
- 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 |