|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.metamatrix.toolbox.ui.widget.tree.DefaultTreeView
public class DefaultTreeView
This is the default TreeView used by DefaultTreeModel
.
Constructor Summary | |
---|---|
DefaultTreeView()
Creates a DefaultTreeView with an empty DefaultTreeNode as a root node. |
|
DefaultTreeView(DefaultTreeNode root)
Creates a DefaultTreeView with an empty DefaultTreeNode as a root node. |
|
DefaultTreeView(java.lang.Object value)
Creates a DefaultTreeView with an empty DefaultTreeNode as a root node. |
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. |
int |
compare(java.lang.Object firstNode,
java.lang.Object secondNode)
|
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.lang.String |
getAbsolutePath(TreeNode node)
|
DefaultTreeNode |
getChild(DefaultTreeNode parent,
int index)
|
int |
getChildCount(TreeNode parent)
|
int |
getChildIndex(DefaultTreeNode parent,
DefaultTreeNode child)
|
java.util.List |
getChildren(TreeNode parent)
Obtain the set of entries that are considered the children of the specified TreeNode. |
java.util.Comparator |
getComparator()
Set the comparator that provides the order for children returned from this view. |
TreeNodeFilter |
getFilter()
Set the filter that limits the set of TreeNode instances returned from this view. |
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 child)
Determine the parent TreeNode for the specified entry, or null if the specified entry 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. |
DefaultTreeNode |
getRoot()
|
java.util.List |
getRoots()
Returns all root partitians on this TreeNode system. |
java.lang.String |
getSeparator()
Not implemented. |
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 void |
initializeDefaultTreeView()
|
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 entry. |
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. |
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 isMarked)
Set the marked state of the specified entry. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
---|
equals |
Constructor Detail |
---|
public DefaultTreeView()
DefaultTreeNode
as a root node.
public DefaultTreeView(DefaultTreeNode root)
DefaultTreeNode
as a root node.
public DefaultTreeView(java.lang.Object value)
DefaultTreeNode
as a root node.
Method Detail |
---|
public boolean allowsChildren(TreeNode node)
TreeView
allowsChildren
in interface TreeView
node
- the TreeNode instance that is to be checked; may
not be null
public boolean allowsChild(TreeNode parent, TreeNode potentialChild)
TreeView
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 int compare(java.lang.Object firstNode, java.lang.Object secondNode)
compare
in interface java.util.Comparator
public UserTransaction createReadTransaction()
UserTransactionFactory
The returned transaction object will not be bound to an underlying
system transaction until begin()
is called on the returned
object.
createReadTransaction
in interface UserTransactionFactory
public UserTransaction createWriteTransaction()
UserTransactionFactory
The returned transaction object will not be bound to an underlying
system transaction until begin()
is called on the returned
object.
createWriteTransaction
in interface UserTransactionFactory
public UserTransaction createWriteTransaction(java.lang.Object source)
UserTransactionFactory
The returned transaction object will not be bound to an underlying
system transaction until begin()
is called on the returned
object.
createWriteTransaction
in interface UserTransactionFactory
source
- the object that is considered to be the source of the transaction;
may be null
public java.lang.String getAbsolutePath(TreeNode node)
public DefaultTreeNode getChild(DefaultTreeNode parent, int index)
public int getChildCount(TreeNode parent)
public int getChildIndex(DefaultTreeNode parent, DefaultTreeNode child)
public java.util.List getChildren(TreeNode parent)
TreeView
getChildren
in interface TreeView
parent
- the TreeNode instance for which the child entries
are to be obtained; may not be null
public java.util.Iterator iterator()
TreeView
iterator
in interface TreeView
public java.util.Iterator iterator(TreeNode startingPoint)
TreeView
iterator
in interface TreeView
startingPoint
- the root of the subtree over which the iterator
is to navigate; may not be null
public java.util.Comparator getComparator()
TreeView
getComparator
in interface TreeView
public PropertiedObjectEditor getPropertiedObjectEditor()
PropertiedObjectView
getPropertiedObjectEditor
in interface PropertiedObjectView
public TreeNodeFilter getFilter()
TreeView
getFilter
in interface TreeView
public TreeNode getHome()
TreeView
getHome
in interface TreeView
public TreeNode getParent(TreeNode child)
TreeView
getParent
in interface TreeView
child
- the TreeNode instance for which the parent is to be obtained;
may not be null
public java.lang.String getPath(TreeNode node)
TreeView
getPath
in interface TreeView
public java.util.List getPropertyDefinitions()
TreeView
getPropertyDefinitions
in interface TreeView
public DefaultTreeNode getRoot()
public java.util.List getRoots()
TreeView
getRoots
in interface TreeView
public java.lang.String getSeparator()
getSeparator
in interface TreeView
public char getSeparatorChar()
TreeView
getSeparatorChar
in interface TreeView
public TreeNodeEditor getTreeNodeEditor()
TreeView
getTreeNodeEditor
in interface TreeView
protected void initializeDefaultTreeView()
public boolean isAncestorOf(TreeNode ancestor, TreeNode descendent)
TreeView
isAncestorOf
in interface TreeView
public boolean isHidden(TreeNode node)
TreeView
isHidden
in interface TreeView
node
- the TreeNode instance that is to be checked; may
not be null
public boolean isMarked(TreeNode node)
TreeView
isMarked
in interface TreeView
public boolean isParentOf(TreeNode parent, TreeNode child)
TreeView
isParentOf
in interface TreeView
public boolean isRoot(TreeNode node)
TreeView
isRoot
in interface TreeView
node
- the TreeNode instance that is to be checked; may
not be null
public void setComparator(java.util.Comparator comparator)
TreeView
setComparator
in interface TreeView
comparator
- the comparator, or null if entry name sorting should be used.public void setFilter(TreeNodeFilter filter)
TreeView
setFilter
in interface TreeView
filter
- the filter, or null if the default "pass-through" filter should be used.public void setMarked(TreeNode node, boolean isMarked)
TreeView
setMarked
in interface TreeView
public java.util.Set getMarked()
getMarked
in interface TreeView
the
- unmodifiable set of marked nodes; never null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |