public class ShapeCreationTool extends Tool
Modifier and Type | Field and Description |
---|---|
protected MapGroup |
_drawingGroup |
static java.lang.String |
TAG |
static java.lang.String |
TOOL_IDENTIFIER |
protected java.util.Stack<EditAction> |
undoStack |
_identifier, _mapListenerCount
Constructor and Description |
---|
ShapeCreationTool(MapView mapView,
MapGroup drawingGroup,
android.widget.ImageButton shapeButton,
DrawingToolsToolbar drawingToolsToolbar,
android.widget.Button undoButton,
android.widget.Button doneButton,
android.content.Context ignored) |
Modifier and Type | Method and Description |
---|---|
protected void |
clearExtraListeners()
Clears all listeners from the map except for those involved with fundamental map operations,
ie pan and pinch.
|
void |
dispose()
Called only by the parent during final cleanup activities.
|
protected void |
initButton() |
boolean |
onKey(android.view.View v,
int keyCode,
android.view.KeyEvent 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.
|
boolean |
run(EditAction action) |
protected void |
setActive(boolean active)
Called to set whether a tool is actively being used.
|
boolean |
shouldEndOnBack()
Returns whether this tool should end when the back button is pressed.
|
void |
undo() |
endTool, findPoint, getActive, getIdentifier, popAllMapListeners, popMapListeners, pushMapListeners, requestBeginTool, requestEndTool
protected final java.util.Stack<EditAction> undoStack
public static final java.lang.String TAG
protected final MapGroup _drawingGroup
public static final java.lang.String TOOL_IDENTIFIER
public ShapeCreationTool(MapView mapView, MapGroup drawingGroup, android.widget.ImageButton shapeButton, DrawingToolsToolbar drawingToolsToolbar, android.widget.Button undoButton, android.widget.Button doneButton, android.content.Context ignored)
public void dispose()
Tool
public boolean onKey(android.view.View v, int keyCode, android.view.KeyEvent event)
public boolean onToolBegin(android.os.Bundle extras)
Tool
onToolBegin
in class Tool
extras
- extra params that were passed by the GUIpublic void onToolEnd()
Tool
public boolean shouldEndOnBack()
Tool
shouldEndOnBack
in class Tool
public boolean run(EditAction action)
public void undo()
protected void setActive(boolean active)
Tool
protected void clearExtraListeners()
Tool
clearExtraListeners
in class Tool
protected void initButton()