org.geotools.gui.tools
Interface ToolList

All Superinterfaces:
java.util.Collection, java.util.List
All Known Implementing Classes:
ToolListImpl

public interface ToolList
extends java.util.List

A list of tools provided by the MapViewer to the operator, including the selectedTool which is the current tool in use. An event is sent to interested classes when the selectedTool changes.
No event is sent if a tool is added or removed from the ToolList as the ToolList is expected to be set up once at startup and not change after that.

Version:
$Id: ToolList.java 17672 2006-01-19 00:25:55Z desruisseaux $
Author:
Cameron Shorter

Method Summary
 void addSelectedToolListener(SelectedToolListener listener)
          Register interest in being called when Tool changes.
 Tool getSelectedTool()
          Get the SelectedTool.
 void removeSelectedToolListener(SelectedToolListener listener)
          Remove interest in bening notified when Tool changes.
 void setSelectedTool(int i)
          Set the tool.
 void setSelectedTool(Tool tool)
          Set the SelectedTool.
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 

Method Detail

addSelectedToolListener

public void addSelectedToolListener(SelectedToolListener listener)
Register interest in being called when Tool changes.

Parameters:
listener - The object to notify when tool changes.

removeSelectedToolListener

public void removeSelectedToolListener(SelectedToolListener listener)
Remove interest in bening notified when Tool changes.

Parameters:
listener - The listener.

getSelectedTool

public Tool getSelectedTool()
Get the SelectedTool. Null will be returned if there is no selectedTool.

Returns:
The SelectedTool.

setSelectedTool

public void setSelectedTool(Tool tool)
Set the SelectedTool.

Parameters:
tool - The new SelectedTtool.

setSelectedTool

public void setSelectedTool(int i)
Set the tool. Added by Jamison Conley, May 24, 2004

Parameters:
i - The index of the selected tool.


Copyright © GeoTools. All Rights Reserved.