com.esri.adf.web.data
Class TocNodeContent

java.lang.Object
  extended by com.esri.adf.web.data.TocNodeContent
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AGSTocLayerContent, AIMSTocLayerContent, GraphicsTocLayerContent, ResultNodeContent, SimpleTocNodeContent, TocResourceContent, VETocNodeContent, WMSTocLayerContent

public abstract class TocNodeContent
extends Object
implements Serializable

A TocNodeContent object stores the content of a TocNode.

See Also:
Serialized Form

Field Summary
protected  boolean disabled
           
 
Constructor Summary
TocNodeContent()
           
 
Method Summary
 List<javax.faces.model.SelectItem> getContextMenuItems()
          The list of javax.faces.model.SelectItem objects representing each item of this node's context menu.
 String getImageUrl()
          Returns a URL to the image to be displayed for this node.
abstract  String getText()
          Returns the text displayed on the node.
 void handleCheckedEvent(boolean checked, TocEvent args)
          Handles the checked/unchecked event occuring at a node.
 void handleContextMenuEvent(String contextMenuItemValue, TocEvent args)
          Handles the context menu event occuring at a node.
 void handleExpandCollapseEvent(boolean expanded, TocEvent args)
          Handles the expand/collapse event occuring at a node.
abstract  void handleNodeEvent(TocEvent args)
          Handles the event which occurs at a content node.
 boolean isCheckable()
          Returns an indicator whether this node is checkable.
 boolean isChecked()
          If isCheckable() is true, it indicates whether it is checked.
 boolean isDisabled()
          Returns an indicator whether this node disabled.
 boolean isSelected()
          Returns an indicator if the node is selected.
 boolean isUrl()
          Returns an indicator if the content is a URL.
 void setChecked(boolean checked)
          Checks/unchecks this node content
 void setDisabled(boolean disable)
          Enables/disables this node content
 void setImageUrl(String imageUrl)
          Sets a URL to an image to be displayed for this node.
 void setText(String text)
          Sets the text displayed on the node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

disabled

protected boolean disabled
Constructor Detail

TocNodeContent

public TocNodeContent()
Method Detail

handleNodeEvent

public abstract void handleNodeEvent(TocEvent args)
                              throws Exception
Handles the event which occurs at a content node. The TocNode delegates event handling for node content operations to this method, typically when the node is clicked.

Parameters:
args - the TocEvent
Throws:
Exception

getText

public abstract String getText()
Returns the text displayed on the node.

Returns:
String- the text

setText

public void setText(String text)
Sets the text displayed on the node.


isUrl

public boolean isUrl()
Returns an indicator if the content is a URL.

Returns:
boolean- if true, the content is a URL. The default is false.

getImageUrl

public String getImageUrl()
Returns a URL to the image to be displayed for this node.

Returns:
String- the image. The default is null.

setImageUrl

public void setImageUrl(String imageUrl)
Sets a URL to an image to be displayed for this node.

Parameters:
imageUrl -

isCheckable

public boolean isCheckable()
Returns an indicator whether this node is checkable.

Returns:
boolean- if true, the node is checkable. The default is false.

isChecked

public boolean isChecked()
If isCheckable() is true, it indicates whether it is checked. If isCheckable() is false, this method has no significance.

Returns:
boolean- returns false

handleCheckedEvent

public void handleCheckedEvent(boolean checked,
                               TocEvent args)
                        throws Exception
Handles the checked/unchecked event occuring at a node.

Parameters:
checked - if true, node is checked
args - the TocEvent
Throws:
Exception

handleExpandCollapseEvent

public void handleExpandCollapseEvent(boolean expanded,
                                      TocEvent args)
                               throws Exception
Handles the expand/collapse event occuring at a node.

Parameters:
expanded - if true, node is expanded
args - the TocEvent
Throws:
Exception

handleContextMenuEvent

public void handleContextMenuEvent(String contextMenuItemValue,
                                   TocEvent args)
                            throws Exception
Handles the context menu event occuring at a node. The method should handle the event according to the contextMenuItemValue parameter. This parameter is based on the context menu items generated by the getContextMenuItems() method.

Parameters:
contextMenuItemValue - the value of the context menu item to be processed
args - the TocEvent
Throws:
Exception

isSelected

public boolean isSelected()
Returns an indicator if the node is selected.

Returns:
boolean- if true, the node is selected. The default is false.

isDisabled

public boolean isDisabled()
Returns an indicator whether this node disabled.

Returns:
boolean if true, the node is disabled. The default is false.

getContextMenuItems

public List<javax.faces.model.SelectItem> getContextMenuItems()
The list of javax.faces.model.SelectItem objects representing each item of this node's context menu. This default implementation returns null.

Returns:
a List of javax.faces.model.SelectItem objects

setDisabled

public void setDisabled(boolean disable)
Enables/disables this node content

Parameters:
disable -

setChecked

public void setChecked(boolean checked)
Checks/unchecks this node content

Parameters:
checked -