|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.metamatrix.common.tree.AbstractTreeView com.metamatrix.common.tree.RuledTreeViewImpl
public class RuledTreeViewImpl
Constructor Summary | |
---|---|
RuledTreeViewImpl(TreeView tree,
ChildRules rules)
|
|
RuledTreeViewImpl(TreeView tree,
TreeNode root,
ChildRules rules)
|
Method Summary | |
---|---|
boolean |
allowsChild(TreeNode parent,
TreeNode potentialChild)
Determine whether the specified parent TreeNode may contain the specified child node. |
boolean |
allowsChildren(TreeNode entry)
Determine whether the specified TreeNode may contain children. |
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. |
protected ChildRules |
getChildRules()
|
TreeNode |
getHome()
Obtain the TreeNode that represents the home for the underlying system. |
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. |
java.util.List |
getRoots()
Returns the single root of this Composite 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 TreeView |
getTreeView()
|
protected java.util.List |
getUnhiddenNodes(java.util.List nodes)
|
protected java.util.Set |
getUnhiddenNodes(java.util.Set nodes)
|
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. |
protected boolean |
isNodeHidden(TreeNode node)
|
boolean |
isParentOf(TreeNode parent,
TreeNode child)
Determine whether the specified node is a child of the given parent node. |
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. |
void |
print(java.io.PrintStream stream)
|
void |
setMarked(TreeNode node,
boolean markedState)
Set the marked state of the specified entry. |
protected void |
setViewRoots(java.util.List roots)
Set the roots for this view. |
Methods inherited from class com.metamatrix.common.tree.AbstractTreeView |
---|
getComparator, getFilter, isRoot, setComparator, setFilter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.metamatrix.common.tree.TreeView |
---|
getComparator, getFilter, isRoot, setComparator, setFilter |
Constructor Detail |
---|
public RuledTreeViewImpl(TreeView tree, ChildRules rules)
public RuledTreeViewImpl(TreeView tree, TreeNode root, ChildRules rules)
Method Detail |
---|
protected TreeView getTreeView()
public PropertiedObjectEditor getPropertiedObjectEditor()
getPropertiedObjectEditor
in interface PropertiedObjectView
getPropertiedObjectEditor
in class AbstractTreeView
public java.util.List getPropertyDefinitions()
getPropertyDefinitions
in interface TreeView
getPropertyDefinitions
in class AbstractTreeView
public java.util.List getRoots()
getRoots
in interface TreeView
getRoots
in class AbstractTreeView
protected void setViewRoots(java.util.List roots)
roots
- the roots for the view; if null, the view will use the same roots
as the view's original tree (model)protected java.util.List getUnhiddenNodes(java.util.List nodes)
protected java.util.Set getUnhiddenNodes(java.util.Set nodes)
public boolean isHidden(TreeNode node)
isHidden
in interface TreeView
isHidden
in class AbstractTreeView
node
- the TreeNode instance that is to be checked; may
not be null
protected boolean isNodeHidden(TreeNode node)
public boolean isMarked(TreeNode node)
isMarked
in interface TreeView
isMarked
in class AbstractTreeView
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
getHome
in class AbstractTreeView
public java.lang.String getPath(TreeNode node)
getPath
in interface TreeView
getPath
in class AbstractTreeView
public char getSeparatorChar()
getSeparatorChar
in interface TreeView
getSeparatorChar
in class AbstractTreeView
public java.lang.String getSeparator()
getSeparator
in interface TreeView
getSeparator
in class AbstractTreeView
public TreeNode getParent(TreeNode node)
getParent
in interface TreeView
getParent
in class AbstractTreeView
node
- the TreeNode instance for which the parent is to be obtained;
may not be null
public boolean allowsChildren(TreeNode entry)
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 java.util.List getChildren(TreeNode parent)
getChildren
in interface TreeView
getChildren
in class AbstractTreeView
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
isParentOf
in class AbstractTreeView
public boolean isAncestorOf(TreeNode ancestor, TreeNode descendent)
isAncestorOf
in interface TreeView
isAncestorOf
in class AbstractTreeView
public TreeNodeEditor getTreeNodeEditor()
getTreeNodeEditor
in interface TreeView
getTreeNodeEditor
in class AbstractTreeView
public UserTransaction createReadTransaction()
createReadTransaction
in interface UserTransactionFactory
createReadTransaction
in class AbstractTreeView
public UserTransaction createWriteTransaction()
createWriteTransaction
in interface UserTransactionFactory
createWriteTransaction
in class AbstractTreeView
public UserTransaction createWriteTransaction(java.lang.Object source)
createWriteTransaction
in interface UserTransactionFactory
createWriteTransaction
in class AbstractTreeView
source
- the object that is considered to be the source of the transaction;
may be null
public java.util.Iterator iterator()
iterator
in interface TreeView
iterator
in class AbstractTreeView
public java.util.Iterator iterator(TreeNode startingPoint)
iterator
in interface TreeView
iterator
in class AbstractTreeView
startingPoint
- the root of the subtree over which the iterator
is to navigate; may not be null
protected ChildRules getChildRules()
public void print(java.io.PrintStream stream)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |