com.esri.adf.web.faces.event
Class ToolItemCollection

java.lang.Object
  extended bycom.esri.adf.web.faces.event.ToolItemCollection
All Implemented Interfaces:
java.io.Serializable

public class ToolItemCollection
extends java.lang.Object
implements java.io.Serializable

A collection of ToolItem objects. Any given map or page control is associated with one ToolItemCollection. An entry in the collection follows this syntax:

  <tool-item>
   <key>ZoomIn</key>
   <action-class>com.esri.adf.web.faces.event.ZoomInToolAction</action-class>
   <client-action>MapDragRectangle&lt/client-action>
  </tool-item>
 
By default, the tools are loaded from default.xml in the web application's tools directory.

See Also:
Serialized Form

Constructor Summary
ToolItemCollection()
          Constructs an empty ToolItemCollection object.
 
Method Summary
 void add(ToolItem toolItem)
          Adds the tool item to this tool item collection.
 ToolItem getActiveTool()
           
 java.lang.String getDescription()
          Returns a description of the collection.
static ToolItemCollection getMapToolItemCollection(java.lang.String mapId)
           
 java.lang.String getName()
          Returns the name of the collection.
 ToolAction getToolAction(java.lang.String toolKey)
          Returns the tool action associated with the specified tool key.
 ToolItem getToolItem(java.lang.String toolKey)
          Returns the ToolItem object represented by this key.
 java.util.Collection getToolItems()
          Return the current tool item collection.
static void resetToolItemCollections()
           
 void setActiveTool(java.lang.String activeToolKey)
           
 void setActiveTool(ToolItem activeTool)
           
static void setMapToolItemCollection(java.lang.String mapId, ToolItemCollection toolItemCollection)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ToolItemCollection

public ToolItemCollection()
Constructs an empty ToolItemCollection object.

Method Detail

getMapToolItemCollection

public static ToolItemCollection getMapToolItemCollection(java.lang.String mapId)

setMapToolItemCollection

public static void setMapToolItemCollection(java.lang.String mapId,
                                            ToolItemCollection toolItemCollection)

resetToolItemCollections

public static void resetToolItemCollections()

setActiveTool

public void setActiveTool(ToolItem activeTool)

setActiveTool

public void setActiveTool(java.lang.String activeToolKey)

getActiveTool

public ToolItem getActiveTool()

getName

public java.lang.String getName()
Returns the name of the collection. Every ToolItemCollection in a WebApplication must have a unique name.

Returns:
String- the unique collection name

getDescription

public java.lang.String getDescription()
Returns a description of the collection.

Returns:
String- the description

getToolItem

public ToolItem getToolItem(java.lang.String toolKey)
Returns the ToolItem object represented by this key.

Parameters:
toolKey - the key for the ToolItem in the ToolItemCollection
Returns:
ToolItem- object describing the tool item

getToolItems

public java.util.Collection getToolItems()
Return the current tool item collection.

Returns:
Collection- tool item collection object

getToolAction

public ToolAction getToolAction(java.lang.String toolKey)
Returns the tool action associated with the specified tool key.

Parameters:
toolKey - the key for the ToolItem in the ToolItemCollection
Returns:
ToolAction- object describing the tool action

add

public void add(ToolItem toolItem)
Adds the tool item to this tool item collection.

Parameters:
toolItem - tool item object