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

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

public class ToolItemCollection
extends Object
implements 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()
           
 String getDescription()
          Returns a description of the collection.
static ToolItemCollection getMapToolItemCollection(String mapId)
           
 String getName()
          Returns the name of the collection.
 ToolAction getToolAction(String toolKey)
          Returns the tool action associated with the specified tool key.
 ToolItem getToolItem(String toolKey)
          Returns the ToolItem object represented by this key.
 Collection<ToolItem> getToolItems()
          Return the current tool item collection.
static void resetToolItemCollections()
           
 void setActiveTool(String activeToolKey)
           
 void setActiveTool(ToolItem activeTool)
           
static void setMapToolItemCollection(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(String mapId)

setMapToolItemCollection

public static void setMapToolItemCollection(String mapId,
                                            ToolItemCollection toolItemCollection)

resetToolItemCollections

public static void resetToolItemCollections()

setActiveTool

public void setActiveTool(ToolItem activeTool)

setActiveTool

public void setActiveTool(String activeToolKey)

getActiveTool

public ToolItem getActiveTool()

getName

public 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 String getDescription()
Returns a description of the collection.

Returns:
String- the description

getToolItem

public ToolItem getToolItem(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 Collection<ToolItem> getToolItems()
Return the current tool item collection.

Returns:
Collection- tool item collection object

getToolAction

public ToolAction getToolAction(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