public class Arrow extends Shape
Modifier and Type | Class and Description |
---|---|
static interface |
Arrow.OnTextChangedListener |
Shape.OnBasicLineStyleChangedListener, Shape.OnFillColorChangedListener, Shape.OnPointsChangedListener, Shape.OnStrokeColorChangedListener, Shape.OnStrokeWeightChangedListener, Shape.OnStyleChangedListener
MapItem.OnAltitudeModeChangedListener, MapItem.OnClickableChangedListener, MapItem.OnGroupChangedListener, MapItem.OnHeightChangedListener, MapItem.OnMetadataChangedListener, MapItem.OnTypeChangedListener, MapItem.OnVisibleChangedListener, MapItem.OnZOrderChangedListener
Modifier and Type | Field and Description |
---|---|
protected float |
_hitRadius |
protected float |
_hitRadiusSq |
protected MapView |
_mapView |
protected GeoPointMetaData |
_point1 |
protected GeoPointMetaData |
_point2 |
protected int |
_textColor |
protected GeoPoint |
_touchPoint |
static java.lang.String |
TAG |
protected java.lang.String |
text |
BASIC_LINE_STYLE_DASHED, BASIC_LINE_STYLE_DOTTED, BASIC_LINE_STYLE_OUTLINED, BASIC_LINE_STYLE_SOLID, STYLE_FILLED_MASK, STYLE_STROKE_MASK
CLICKABLE_DEFAULT, EDITABLE_DEFAULT, EMPTY_TYPE, HIT_RATIO_DEFAULT, MOVABLE_DEFAULT, VISIBLE_DEFAULT, ZORDER_DEFAULT, ZORDER_HITTEST_COMPARATOR, ZORDER_RENDER_COMPARATOR
metadata
Constructor and Description |
---|
Arrow(long serialId,
MetaDataHolder metadata,
java.lang.String uid) |
Arrow(java.lang.String uid) |
Modifier and Type | Method and Description |
---|---|
void |
addOnTextChangedListener(Arrow.OnTextChangedListener l) |
void |
drawCanvas(CapturePP cap,
android.os.Bundle data)
Draw the item to the canvas
|
GeoBounds |
getBounds(MutableGeoBounds bounds)
The bounds of the shape
|
GeoPointMetaData |
getCenter()
Provides the center point for the Shape, or null if an error has occurred.
|
GeoPointMetaData[] |
getMetaDataPoints()
The array of points that make up the shape with the corresponding metadata.
|
GeoPointMetaData |
getPoint1()
Get the tail point of the arrow when not rendered in reverse.
|
GeoPointMetaData |
getPoint2()
Get the head point of the arrow when not rendered in reverse.
|
GeoPoint[] |
getPoints()
The array of points without any metadata
|
java.lang.String |
getText() |
int |
getTextColor() |
android.os.Bundle |
preDrawCanvas(CapturePP cap)
Save forwarded points to meta data holder
These will be used later in drawCanvas
|
void |
removeOnTextChangedListener(Arrow.OnTextChangedListener l) |
void |
setAltitudeMode(Feature.AltitudeMode altitudeMode)
Set the altitude mode for this item
See
AltitudeMode for possible values |
void |
setHitRadius(float radius)
The hit radius for the arrow
|
void |
setPoint1(GeoPointMetaData p)
Set the tail point of the arrow when not rendered in reverse.
|
void |
setPoint2(GeoPointMetaData p)
Set the head point of the arrow when not rendered in reverse.
|
void |
setText(java.lang.String text)
The text displayed on the arrow.
|
void |
setTextColor(int color) |
protected void |
update() |
addOnBasicLineStyleChangedListener, addOnFillColorChangedListener, addOnPointsChangedListener, addOnStrokeColorChangedListener, addOnStrokeWeightChangedListener, addOnStyleChangedListener, addStyleBits, findTouchPoint, getArea, getBasicLineStyle, getClickPoint, getFillColor, getGeoPointMetaData, getIconColor, getPerimeterOrLength, getStrokeColor, getStrokeStyle, getStrokeWeight, getStyle, getTitle, onBasicLineStyleChanged, onFillColorChanged, onPointsChanged, onStrokeColorChanged, onStrokeStyleChanged, onStrokeWeightChanged, onStyleChanged, removeOnBasicLineStyleChangedListener, removeOnFillColorChangedListener, removeOnPointsChangedListener, removeOnStrokeColorChangedListener, removeOnStrokeWeightChangedListener, removeOnStyleChangedListener, removeStyleBits, setBasicLineStyle, setColor, setColor, setFillAlpha, setFillColor, setStrokeColor, setStrokeStyle, setStrokeWeight, setStyle, setTitle, setTouchPoint, wrap180
addOnAltitudeModeChangedListener, addOnClickableChangedListener, addOnGroupChangedListener, addOnHeightChangedListener, addOnMetadataChangedListener, addOnMetadataChangedListener, addOnTypeChangedListener, addOnVisibleChangedListener, addOnZOrderChangedListener, computeDistance, copyMetaData, createSerialId, dispose, getAltitudeMode, getClickable, getEditable, getGroup, getHashtags, getHeight, getHitRadius, getIconDrawable, getMetaBoolean, getMetaString, getMovable, getRadialMenuPath, getRemarks, getRemarksKey, getSerialId, getTag, getType, getUID, getUniqueMapItemName, getURI, getVisible, getVisible, getZOrder, isTouchable, notifyMetadataChanged, onAdded, onAltitudeModeChanged, onClickableChanged, onGroupChanged, onHeightChanged, onMetadataChanged, onRemoved, onTypeChanged, onVisibilityConditions, onVisibleChanged, onZOrderChanged, persist, refresh, removeFromGroup, removeMetaData, removeOnAltitudeModeChangedListener, removeOnClickableChangedListener, removeOnGroupChangedListener, removeOnHeightChangedListener, removeOnMetadataChangedListener, removeOnMetadataChangedListener, removeOnTypeChangedListener, removeOnVisibleChangedListener, removeOnZOrderChangedListener, setClickable, setClickPoint, setEditable, setHashtags, setHeight, setMetaBoolean, setMetaData, setMetaDouble, setMetaIntArray, setMetaInteger, setMetaLong, setMetaMap, setMetaParcelable, setMetaSerializable, setMetaString, setMetaStringArrayList, setMovable, setRadialMenu, setRemarks, setTag, setTouchable, setType, setVisible, setVisible, setZOrder, testOrthoHit, toString
get, getMetaData, getMetaDouble, getMetaIntArray, getMetaInteger, getMetaLong, getMetaMap, getMetaParcelable, getMetaSerializable, getMetaStringArrayList, hasMetaValue, setMetaDataImpl, toggleMetaData
public static final java.lang.String TAG
protected GeoPointMetaData _point1
protected GeoPointMetaData _point2
protected MapView _mapView
protected float _hitRadius
protected float _hitRadiusSq
protected GeoPoint _touchPoint
protected java.lang.String text
protected int _textColor
public Arrow(java.lang.String uid)
public Arrow(long serialId, MetaDataHolder metadata, java.lang.String uid)
public void setHitRadius(float radius)
radius
- the radius in pixelspublic GeoPointMetaData getPoint1()
public void setPoint1(GeoPointMetaData p)
p
- the point for the tail to start at.public GeoPointMetaData getPoint2()
public void setPoint2(GeoPointMetaData p)
p
- the point for the head to point to.public void setText(java.lang.String text)
text
- the textpublic java.lang.String getText()
public void setTextColor(int color)
public int getTextColor()
protected final void update()
public void addOnTextChangedListener(Arrow.OnTextChangedListener l)
public void removeOnTextChangedListener(Arrow.OnTextChangedListener l)
public GeoPointMetaData getCenter()
Shape
public GeoPointMetaData[] getMetaDataPoints()
Shape
getMetaDataPoints
in class Shape
public GeoPoint[] getPoints()
Shape
public GeoBounds getBounds(MutableGeoBounds bounds)
Shape
public void setAltitudeMode(Feature.AltitudeMode altitudeMode)
MapItem
AltitudeMode
for possible valuessetAltitudeMode
in class MapItem
altitudeMode
- Altitude modepublic android.os.Bundle preDrawCanvas(CapturePP cap)
Capturable
preDrawCanvas
in interface Capturable
preDrawCanvas
in class Shape
cap
- Capture instance (use forward() to convert)public void drawCanvas(CapturePP cap, android.os.Bundle data)
Capturable
drawCanvas
in interface Capturable
drawCanvas
in class Shape
cap
- Canvas to draw to (use getCanvas())data
- Point data saved in preDrawCanvas