|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Base class for all the geotools Tools, like PanTool, ZoomTool, etc. Tools process mouse events on behalf of widgets like MapPane and change data in the Context (like the AreaOfInterest).
| Method Summary | |
void |
addMouseListener(java.awt.Component component,
MapContext context)
Register this tool to receive Mouse Events from component.
|
void |
addMouseMotionListener(java.awt.Component component,
MapContext context)
|
void |
destroy()
Clean up this class. |
MapContext |
getContext()
Get the context. |
java.awt.Cursor |
getCursor()
Return the prefered cursor for this tool. |
java.lang.String |
getName()
Get the name of the tool. |
void |
paint(java.awt.Graphics g)
|
void |
removeMouseListeners()
Remove all Mouse Listeners from this tool. |
void |
setCursor(java.awt.Cursor cursor)
Set the cursor for this Tool. |
void |
setName(java.lang.String name)
Set the name for the tool, eg "Zoom In", "Zoom Out", "Pan". |
| Method Detail |
public void addMouseListener(java.awt.Component component,
MapContext context)
throws java.lang.IllegalArgumentException
component.
The events may be MouseEvents or MouseMotionEvents or both depending on
the Tool which implements this interface.
component - The tool will process mouseEvents from this component.context - The Context that will be changed by this Tool.
java.lang.IllegalArgumentException - if an argument is null or
the tool is being assigned a different context to before.
public void addMouseMotionListener(java.awt.Component component,
MapContext context)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic void removeMouseListeners()
public MapContext getContext()
public void setName(java.lang.String name)
name - what to call this tool.public java.lang.String getName()
public java.awt.Cursor getCursor()
public void setCursor(java.awt.Cursor cursor)
cursor - The cursor to associate with this tool.public void destroy()
public void paint(java.awt.Graphics g)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||