|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.templateutil.navigationbar.NavigationTreeModel
Implementation of the TreeModel interface that works with the NavigationTreeNode class. The implementation of methods of the TreeModel interface are straight forward and intuitively what would be expected. The only idiosyncrasy is that the nodes passed in need to be an instance of NavigationTreeNode.
There are several methods that are provide additional functionality beyond the
TreeModel interface. These methods support Navigation Bar specific functionality.
For example, the method buldSelectedNodeList is used to create a chain of
NavigationTreeNodes that represent the descent into a multi-tier navigation
scheme down to the NavigationTreeNode that generated the current URL.
Supported API: false
Extendable: false
Field Summary | |
private String |
name
Deprecated. |
private NavigationTreeNode |
root
Deprecated. |
private List |
selectedNodeList
Deprecated. |
Constructor Summary | |
NavigationTreeModel(String name,
NavigationTreeNode root)
Deprecated. |
Method Summary | |
protected void |
addSelectedNode(NavigationTreeNode treeNode,
HashMap queryValueMap,
Object contextObject)
Deprecated. Recursive function that builds the selected node list. |
void |
addTreeModelListener(TreeModelListener l)
Deprecated. Throws an UnsupportedOperationException when called |
void |
buildSelectedNodeList(HashMap queryValueMap,
Object contextObject)
Deprecated. Builds a list of nodes based on the current URL query string (queryValueMap) that represents a "chain of links". |
Object |
getChild(Object parent,
int index)
Deprecated. Returns the child of the parent at the position index specified by index, if the parent is a NavigationTreeNode. |
int |
getChildCount(Object parent)
Deprecated. |
int |
getIndexOfChild(Object parent,
Object child)
Deprecated. Returns index of the child in the list of the parent's immediate descendents. |
String |
getName()
Deprecated. |
Object |
getRoot()
Deprecated. |
List |
getSelectNodeList()
Deprecated. Returns an unmodifiable list that represents a "chain of links" leading the currently selected link based on the current URL in a multi-tier navigation tree. |
boolean |
isLeaf(Object node)
Deprecated. |
boolean |
isSelectedNode(NavigationTreeNode treeNode)
Deprecated. Returns a flag to indicate if the NavigationTreeNode passed in is on the "chain of links" in part of a multi-tier navigation tree. |
void |
removeTreeModelListener(TreeModelListener l)
Deprecated. Throws an UnsupportedOperationException when called |
void |
valueForPathChanged(TreePath path,
Object newValue)
Deprecated. Empty implementation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private String name
private NavigationTreeNode root
private List selectedNodeList
Constructor Detail |
public NavigationTreeModel(String name, NavigationTreeNode root)
Method Detail |
public String getName()
public Object getRoot()
getRoot
in interface TreeModel
public Object getChild(Object parent, int index)
getChild
in interface TreeModel
parent
- - Child at index "index" is returned. Needs to be a NavigationTreeNode instance.index
- - Position of child in parent subtreepublic int getChildCount(Object parent)
getChildCount
in interface TreeModel
public boolean isLeaf(Object node)
isLeaf
in interface TreeModel
public void valueForPathChanged(TreePath path, Object newValue)
valueForPathChanged
in interface TreeModel
public int getIndexOfChild(Object parent, Object child)
If the parent or the child is NOT an instance of NavigationTreeNode, -1 is returned.
getIndexOfChild
in interface TreeModel
parent
- - Needs to be a NavigationTreeNode instancechild
- - Needs to be a NavigationTreeNode instancepublic void addTreeModelListener(TreeModelListener l)
addTreeModelListener
in interface TreeModel
l
- public void removeTreeModelListener(TreeModelListener l)
removeTreeModelListener
in interface TreeModel
l
- public boolean isSelectedNode(NavigationTreeNode treeNode)
treeNode
- - Candidate NavigationTreeNode to check for membership on
the "chain of links"public void buildSelectedNodeList(HashMap queryValueMap, Object contextObject)
For example, if the NavigationTreeModel represents a three tiered navigation scheme and the current URL represents a link on the bottom tier, then the link on the bottom tier, its parent link, and its grandparent link are all part of the "chain of links". The list that is returned contains those nodes, with the first node representing the node on the first tier, and the last node representing the node that generated the current URL(not necessarily a node in the bottom tier).
queryValueMap
- - name/value pairs from the query string of the current URLcontextObject
- - the current context objectpublic List getSelectNodeList()
For example, if the NavigationTreeModel represents a three tiered navigation scheme and the current URL represents a link on the bottom tier, then the link on the bottom tier, its parent link, and its grandparent link are all part of the "chain of links". The list that is returned contains those nodes, with the first node representing the node on the first tier, and the last node representing the node that generated the current URL(not necessarily a node in the bottom tier).
protected void addSelectedNode(NavigationTreeNode treeNode, HashMap queryValueMap, Object contextObject)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |