com.esri.adf.web.ags.data
Class AGSTocFunctionality

java.lang.Object
  extended by com.esri.adf.web.ags.data.AGSTocFunctionality
All Implemented Interfaces:
GISFunctionality, TocFunctionality, Serializable

public class AGSTocFunctionality
extends Object
implements TocFunctionality, Serializable

See Also:
Serialized Form

Field Summary
protected  Class customLayerContentClass
           
protected  String customLayerContentClassName
          The name of the custom class (which should be a sub-class of AGSTocLayerContent) to use for the AGS layer nodes
protected  AGSMapFunctionality mFunc
           
protected  WebToc mToc
           
protected static TocNodeContent placeHolderNodeContent
           
protected  boolean showSwatches
           
 
Fields inherited from interface com.esri.adf.web.data.TocFunctionality
FUNCTIONALITY_NAME
 
Constructor Summary
AGSTocFunctionality()
           
 
Method Summary
 void addPatches(TocNode node, int layerId)
           
 void createTocHierarchy(TocNode parentNode)
           Creates the content hierarchy for this TOC.
 void destroyFunctionality()
           The cleanup chores (such as releasing held resources) for the functionality must be performed in this method.
 String getCustomLayerContentClassName()
          Returns the name of the custom class (which should be a sub-class of AGSTocLayerContent) to use for the AGS layer nodes
 AGSMapFunctionality getMapFunctionality()
           
 double getPatchHeight()
           
 double getPatchResolution()
           
 double getPatchWidth()
           
 AGSMapResource getResource()
           Returns the GISResource associated with this functionality.
 void initFunctionality(GISResource resource)
           The initialization chores for the functionality must be performed in this method.
 boolean isShowSwatches()
           
 void setCustomLayerContentClassName(String customLayerContentClassName)
          Sets the name of the custom class (which should be a sub-class of AGSTocLayerContent) to use for the AGS layer nodes
 void setPatchHeight(double patchHeight)
           
 void setPatchResolution(double patchResolution)
           
 void setPatchWidth(double patchWidth)
           
 void setShowSwatches(boolean showSwatches)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mFunc

protected AGSMapFunctionality mFunc

mToc

protected WebToc mToc

customLayerContentClassName

protected String customLayerContentClassName
The name of the custom class (which should be a sub-class of AGSTocLayerContent) to use for the AGS layer nodes


customLayerContentClass

protected Class customLayerContentClass

showSwatches

protected boolean showSwatches

placeHolderNodeContent

protected static final TocNodeContent placeHolderNodeContent
Constructor Detail

AGSTocFunctionality

public AGSTocFunctionality()
Method Detail

initFunctionality

public void initFunctionality(GISResource resource)
Description copied from interface: GISFunctionality

The initialization chores for the functionality must be performed in this method. This method is called by the resource when the functionality needs to be initialized. This happens either when the resource itself is being initialized or if users add this functionality to the resource using the GISResource.addFunctionality(String, GISFunctionality) method after the resource has already been initialized.

Classes which implement this method should maintain the resource as a class instance variable and return the same in the GISFunctionality.getResource() method. The functionality is ready for use only after this method has been called.

Specified by:
initFunctionality in interface GISFunctionality
Parameters:
resource - the GISResource that this functionality supports
See Also:
GISResource.init(WebContext)

destroyFunctionality

public void destroyFunctionality()
Description copied from interface: GISFunctionality

The cleanup chores (such as releasing held resources) for the functionality must be performed in this method. This method is called by the GISResource when the resource itself is being destroyed.

The functionality is no longer usable after this method has been called.

Specified by:
destroyFunctionality in interface GISFunctionality
See Also:
GISResource.destroy()

getMapFunctionality

public AGSMapFunctionality getMapFunctionality()

createTocHierarchy

public void createTocHierarchy(TocNode parentNode)
Description copied from interface: TocFunctionality

Creates the content hierarchy for this TOC.

The content generated should be structured as a tree of TocNodes. The WebToc calls this method on each TOC functionality when it first creates the TOC hierarchy. It passes the TocNode representing the node for the resource of the functionality to this method. The TOC functionality is reponsible for generating its content as children nodes of this resource node.

Specified by:
createTocHierarchy in interface TocFunctionality
Parameters:
parentNode - the parent TocNode for the content generated by this TOC functionality

addPatches

public void addPatches(TocNode node,
                       int layerId)

getResource

public AGSMapResource getResource()
Description copied from interface: GISFunctionality

Returns the GISResource associated with this functionality.

The resource passed to GISFunctionality.initFunctionality(GISResource) is maintained as a class variable and is accessible through this method.

Specified by:
getResource in interface GISFunctionality
Returns:
the GISResource associated with this functionality

setPatchWidth

public void setPatchWidth(double patchWidth)

setPatchHeight

public void setPatchHeight(double patchHeight)

setPatchResolution

public void setPatchResolution(double patchResolution)

getPatchWidth

public double getPatchWidth()

getPatchHeight

public double getPatchHeight()

getPatchResolution

public double getPatchResolution()

getCustomLayerContentClassName

public String getCustomLayerContentClassName()
Returns the name of the custom class (which should be a sub-class of AGSTocLayerContent) to use for the AGS layer nodes

Returns:
the name of the custom class

setCustomLayerContentClassName

public void setCustomLayerContentClassName(String customLayerContentClassName)
Sets the name of the custom class (which should be a sub-class of AGSTocLayerContent) to use for the AGS layer nodes

Parameters:
customLayerContentClassName - the name of the custom class

isShowSwatches

public boolean isShowSwatches()

setShowSwatches

public void setShowSwatches(boolean showSwatches)