com.esri.adf.web.data.graphics
Class GraphicsTocLayerContent

java.lang.Object
  extended by com.esri.adf.web.data.TocNodeContent
      extended by com.esri.adf.web.data.graphics.GraphicsTocLayerContent
All Implemented Interfaces:
Serializable

public class GraphicsTocLayerContent
extends TocNodeContent

GraphicsTocLayerContent stores the content of a TocNode when working with GraphicsLayer.

See Also:
Serialized Form

Field Summary
protected  GraphicsLayer layer
          The GraphicsLayer object.
protected  GraphicsTocFunctionality tocFunc
          The GraphicsTocFunctionality in which the layer belongs.
 
Fields inherited from class com.esri.adf.web.data.TocNodeContent
disabled
 
Constructor Summary
GraphicsTocLayerContent()
          Constructs an empty GraphicsTocLayerContent with the layer and toc funtionality set to null.
GraphicsTocLayerContent(GraphicsTocFunctionality tocFunc, GraphicsLayer layer)
          Constructs the GraphicsTocLayerContent object and stores the information needed for the layer.
 
Method Summary
 String getText()
          Returns the text displayed on the node.
 void handleCheckedEvent(boolean checked, TocEvent args)
          Handles the checked/unchecked event occurring at a node.
 void handleNodeEvent(TocEvent args)
          Handles the event which occurs at a content node.
 void initLayerContent(GraphicsTocFunctionality tocFunc, GraphicsLayer layer)
          Intialize the GraphicsTocLayerContent object and stores the information needed for the layer.
 boolean isCheckable()
          Returns an indicator whether this node is checkable.
 boolean isChecked()
          If isCheckable() is true, it indicates whether it is checked.
 
Methods inherited from class com.esri.adf.web.data.TocNodeContent
getContextMenuItems, getImageUrl, handleContextMenuEvent, handleExpandCollapseEvent, isDisabled, isSelected, isUrl, setChecked, setDisabled, setImageUrl, setText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

layer

protected GraphicsLayer layer
The GraphicsLayer object.


tocFunc

protected GraphicsTocFunctionality tocFunc
The GraphicsTocFunctionality in which the layer belongs.
   For Example,
     tocFunc.getResource.removeGraphicsLayer(layer);
 

Constructor Detail

GraphicsTocLayerContent

public GraphicsTocLayerContent()
Constructs an empty GraphicsTocLayerContent with the layer and toc funtionality set to null.


GraphicsTocLayerContent

public GraphicsTocLayerContent(GraphicsTocFunctionality tocFunc,
                               GraphicsLayer layer)
Constructs the GraphicsTocLayerContent object and stores the information needed for the layer.

Parameters:
tocFunc - the GraphicsTocFunctionality in which the layer belongs
layer - the GraphicsLayer object
Method Detail

initLayerContent

public void initLayerContent(GraphicsTocFunctionality tocFunc,
                             GraphicsLayer layer)
Intialize the GraphicsTocLayerContent object and stores the information needed for the layer.

Parameters:
tocFunc - the GraphicsTocFunctionality in which the layer belongs
layer - the GraphicsLayer object

getText

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

Specified by:
getText in class TocNodeContent
Returns:
String- the text

handleCheckedEvent

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

Overrides:
handleCheckedEvent in class TocNodeContent
Parameters:
checked - if true, node is checked
args - the TocEvent
Throws:
Exception

isCheckable

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

Overrides:
isCheckable in class TocNodeContent
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.

Overrides:
isChecked in class TocNodeContent
Returns:
boolean- returns false

handleNodeEvent

public void handleNodeEvent(TocEvent args)
                     throws Exception
Description copied from class: TocNodeContent
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.

Specified by:
handleNodeEvent in class TocNodeContent
Parameters:
args - the TocEvent
Throws:
Exception