|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.esri.adf.web.data.TocNode
public class TocNode
A TocNode stores content, maintains hierarchical relationships, and responds to events that occur on a table of
contents node. To store content, a TocNode requires a TocNodeContent object to encapsulate the content at
that node. A TocNode handles its own expand or collapse event and delegates the check box event—for layer
visibility—and the node operation—when node content is clicked—to the TocNodeContent’s event handling methods.
| Field Summary | |
|---|---|
static int |
CONTEXT_MENU_OPERATION
The context menu operation. |
static int |
EXPAND_COLLAPSE_OPERATION
The expand/collapse operation. |
static int |
NODE_OPERATION
The node click operation. |
| Constructor Summary | |
|---|---|
|
TocNode(TocNodeContent content)
Constructs a TocNode. |
|
TocNode(TocNodeContent content,
int order)
Constructs the TocNode and places the content in the specified order. |
protected |
TocNode(TocNodeContent content,
int order,
TocNode parent)
|
| Method Summary | |
|---|---|
TocNode |
addChild(int order,
TocNodeContent content)
Adds a child to the TOC content placed at the specified order. |
TocNode |
addChild(TocNodeContent content)
Adds a child to the TOC content. |
TocNode |
findNode(java.lang.String key)
Finds a node based on the key of the TocNode. |
java.util.Collection<TocNode> |
getChildren()
Returns all the children of this node. |
TocNodeContent |
getContent()
Returns the content of this node. |
java.lang.String |
getKey()
Returns the unique key identifying this node. |
int |
getLevel()
Returns the level of this node which is the level of its parent + 1. |
int |
getOrder()
Returns the order of this node among its siblings. |
void |
handleCheckedEvent(boolean checked,
TocEvent args)
Handles the checked/unchecked operations for the node. |
void |
handleNodeEvent(TocEvent args)
Handles the node event at this node. |
boolean |
isExpanded()
Returns an indicator whether the node is expanded. |
void |
setAllExpanded(boolean expanded,
int level)
Sets the expand level for all the nodes. |
void |
setExpanded(boolean expanded)
Sets whether the node is expanded. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int EXPAND_COLLAPSE_OPERATION
public static final int NODE_OPERATION
public static final int CONTEXT_MENU_OPERATION
| Constructor Detail |
|---|
public TocNode(TocNodeContent content)
content - the TocNodeContent to store at the top level.
public TocNode(TocNodeContent content,
int order)
content - the TocNodeContentorder - the index in the TOC
protected TocNode(TocNodeContent content,
int order,
TocNode parent)
| Method Detail |
|---|
public TocNode addChild(TocNodeContent content)
content - the TocNodeContent
TocNode- the new TocNode
public TocNode addChild(int order,
TocNodeContent content)
order - the index in the TOCcontent - the TocNodeContent
TocNode- the new TocNodepublic java.util.Collection<TocNode> getChildren()
public TocNodeContent getContent()
TocNodeContent- the TocNodeContentpublic int getOrder()
public int getLevel()
public boolean isExpanded()
public void setExpanded(boolean expanded)
expanded - if true, the node is expanded
public void setAllExpanded(boolean expanded,
int level)
expanded - if true, set all nodes expanded.level - the number of levels to be expanded. Fully expand if level < 0.
public void handleNodeEvent(TocEvent args)
throws java.lang.Exception
TocControl calls this method for
a TOC event which is not a check/uncheck operation. The expand/collapse operation is handled and the arguments are
then passed on to the TocNodeContent of this node to handle any events which occurred at the content level.
args - the TocEvent
java.lang.Exception
public void handleCheckedEvent(boolean checked,
TocEvent args)
throws java.lang.Exception
checked - if true, the node is checkedargs - TocEvent
java.lang.Exception - if an error occurs for the checked eventpublic TocNode findNode(java.lang.String key)
key - the TocNode key
TocNode- the TocNode which matches the keypublic java.lang.String getKey()
String- the key
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||