public class ShapeToolUtils extends AbstractMapItemSelectionTool
Modifier and Type | Class and Description |
---|---|
static interface |
ShapeToolUtils.Callback<A,B>
Functional interface for callbacks
|
_identifier, _mapListenerCount, _mapView
Constructor and Description |
---|
ShapeToolUtils(MapView mapView) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
isItem(MapItem mi)
Implementation of this should decide if the map item is appropriate.
|
<A> void |
runCircleCreationTool(ShapeToolUtils.Callback<DrawingCircle,A> callback,
ShapeToolUtils.Callback<java.lang.Error,A> onError)
Run the circle creation tool
|
<A> void |
runPolygonCreationTool(ShapeToolUtils.Callback<Shape,A> callback,
ShapeToolUtils.Callback<java.lang.Error,A> onError)
Run the shape creation tool
|
<A> void |
runRectangleCreationTool(ShapeToolUtils.Callback<Shape,A> callback,
ShapeToolUtils.Callback<java.lang.Error,A> onError)
Run the rectangle creation tool
|
<A> void |
runRegionSelectionTool(ShapeToolUtils.Callback<MapItem,A> callback,
ShapeToolUtils.Callback<java.lang.Error,A> onError)
Run the region select tool
|
dispose, onMapEvent, onToolBegin, onToolEnd
clearExtraListeners, endTool, findPoint, getActive, getIdentifier, onKey, popAllMapListeners, popMapListeners, pushMapListeners, requestBeginTool, requestEndTool, setActive, shouldEndOnBack
public ShapeToolUtils(MapView mapView)
protected boolean isItem(MapItem mi)
AbstractMapItemSelectionTool
isItem
in class AbstractMapItemSelectionTool
mi
- the map item selected.public <A> void runCircleCreationTool(ShapeToolUtils.Callback<DrawingCircle,A> callback, ShapeToolUtils.Callback<java.lang.Error,A> onError)
A
- Callback return type (unused)callback
- Callback invoked when the circle is successfully createdonError
- Error callbackpublic <A> void runPolygonCreationTool(ShapeToolUtils.Callback<Shape,A> callback, ShapeToolUtils.Callback<java.lang.Error,A> onError)
A
- Callback return type (unused)callback
- Callback invoked when the shape is successfully createdonError
- Error callbackpublic <A> void runRectangleCreationTool(ShapeToolUtils.Callback<Shape,A> callback, ShapeToolUtils.Callback<java.lang.Error,A> onError)
A
- Callback return type (unused)callback
- Callback invoked when the rectangle is successfully createdonError
- Error callbackpublic <A> void runRegionSelectionTool(ShapeToolUtils.Callback<MapItem,A> callback, ShapeToolUtils.Callback<java.lang.Error,A> onError)
A
- Callback return type (unused)callback
- Callback invoked when an item is selectedonError
- Error callback