public abstract class AbstractMapItemSelectionTool extends Tool implements MapEventDispatcher.MapEventDispatchListener
_identifier, _mapListenerCount, _mapView
Constructor and Description |
---|
AbstractMapItemSelectionTool(MapView mapView,
java.lang.String toolId,
java.lang.String toolFinished,
java.lang.String prompt,
java.lang.String invalidSelection)
The implementation of the map item selection tool appropriately manages the stack and provides
the appropriate level of feedback when an incorrect item is selected.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Must call dispose when the isim is no longer being used.
|
protected abstract boolean |
isItem(MapItem mi)
Implementation of this should decide if the map item is appropriate.
|
void |
onMapEvent(MapEvent event) |
boolean |
onToolBegin(android.os.Bundle extras)
Called when this tool has been asked to start (and after the last tool has cleaned up)
|
void |
onToolEnd()
Called when this tool has been asked to end, either directly or by the user selecting a new
tool or possibly a new toolbar.
|
clearExtraListeners, endTool, findPoint, getActive, getIdentifier, onKey, popAllMapListeners, popMapListeners, pushMapListeners, requestBeginTool, requestEndTool, setActive, shouldEndOnBack
public AbstractMapItemSelectionTool(MapView mapView, java.lang.String toolId, java.lang.String toolFinished, java.lang.String prompt, java.lang.String invalidSelection)
mapView
- The mapView.toolId
- the unique identifier used to start the tool. This should be unique across
the application and the recommendation is to make use of the package name and
class for the concrete implementation. This intent is also fired when thetoolFinished
- the intent action that is fired with the result when the map item is
selected or when the tool is ended. If there was an item selected
the "uid" string extra is set.prompt
- the prompt to show the user on the screen.invalidSelection
- the toast shown when an invalid item is selected.public void dispose()
public boolean onToolBegin(android.os.Bundle extras)
Tool
onToolBegin
in class Tool
extras
- extra params that were passed by the GUIpublic void onToolEnd()
Tool
protected abstract boolean isItem(MapItem mi)
mi
- the map item selected.public void onMapEvent(MapEvent event)
onMapEvent
in interface MapEventDispatcher.MapEventDispatchListener