public class Association extends Shape implements AnchoredMapItem
Association has the following properties:
Notable GLMapComponent (touch) behavior:
Modifier and Type | Class and Description |
---|---|
static interface |
Association.OnClampToGroundChangedListener |
static interface |
Association.OnColorChangedListener
Association color property listener
|
static interface |
Association.OnFirstItemChangedListener
Association firstItem property listener
|
static interface |
Association.OnLinkChangedListener
Association link property listener
|
static interface |
Association.OnParentChangedListener |
static interface |
Association.OnSecondItemChangedListener
Association secondItem property listener
|
static interface |
Association.OnStrokeWeightChangedListener
Association strokeWeight property listener
|
static interface |
Association.OnStyleChangedListener
Association style property listener
|
static interface |
Association.OnTextChangedListener |
Shape.OnBasicLineStyleChangedListener, Shape.OnFillColorChangedListener, Shape.OnPointsChangedListener, Shape.OnStrokeColorChangedListener
MapItem.OnAltitudeModeChangedListener, MapItem.OnClickableChangedListener, MapItem.OnGroupChangedListener, MapItem.OnHeightChangedListener, MapItem.OnMetadataChangedListener, MapItem.OnTypeChangedListener, MapItem.OnVisibleChangedListener, MapItem.OnZOrderChangedListener
Modifier and Type | Field and Description |
---|---|
static int |
LINK_LINE
Show a line-segment link between the two objects
|
static int |
LINK_NONE
Show now visible link between the two objects
|
static int |
STYLE_DASHED
The link will be dashed
|
static int |
STYLE_DOTTED
The link will be dotted
|
static int |
STYLE_OUTLINED |
static int |
STYLE_SOLID
The link will be solid throughout
|
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 |
---|
Association(long serialId,
MetaDataHolder metadata,
PointMapItem firstItem,
PointMapItem secondItem,
java.lang.String uid) |
Association(long serialId,
MetaDataHolder metadata,
java.lang.String uid) |
Association(PointMapItem firstItem,
PointMapItem secondItem,
java.lang.String uid)
Create an Association given two point items
|
Association(java.lang.String uid)
Create an Association with no point items
|
Modifier and Type | Method and Description |
---|---|
void |
addOnClampToGroundChangedListener(Association.OnClampToGroundChangedListener l) |
void |
addOnColorChangedListener(Association.OnColorChangedListener l)
Add a 'color' property listener
|
void |
addOnFirstItemChangedListener(Association.OnFirstItemChangedListener l)
Add a 'firstItem' property listener
|
void |
addOnLinkChangedListener(Association.OnLinkChangedListener l)
Add a 'link' property listener
|
void |
addOnParentChangedListener(Association.OnParentChangedListener l) |
void |
addOnSecondItemChangedListener(Association.OnSecondItemChangedListener l)
Add a 'secondItem' property listener
|
void |
addOnStrokeWeightChangedListener(Association.OnStrokeWeightChangedListener l)
Add a 'strokeWeight' property listener
|
void |
addOnStyleChangedListener(Association.OnStyleChangedListener l)
Add a 'style' property listener
|
void |
addOnTextChangedListener(Association.OnTextChangedListener l) |
void |
drawCanvas(CapturePP cap,
android.os.Bundle data)
Draw the item to the canvas
|
PointMapItem |
getAnchorItem()
Get the anchor marker for this item
|
int |
getBasicLineStyle()
Returns the current state of the Basic Line Style.
|
GeoBounds |
getBounds(MutableGeoBounds bounds)
The bounds of the shape
|
GeoPointMetaData |
getCenter()
Gets the center point of this association
|
boolean |
getClampToGround() |
int |
getColor()
Get the link color
|
PointMapItem |
getFirstItem()
Get the first PointMapItem in the Assocaition
|
int |
getLink()
Get the link type
|
Marker |
getMarker() |
GeoPointMetaData[] |
getMetaDataPoints()
The array of points that make up the shape with the corresponding metadata.
|
AssociationSet |
getParent() |
GeoPoint[] |
getPoints()
The array of points without any metadata
|
PointMapItem |
getSecondItem()
Get the second PointMapItem in the Association
|
double |
getStrokeWeight()
Get the stroke weight
|
int |
getStyle()
Get the link primitive style
|
java.lang.String |
getText() |
protected void |
onClampToGroundChanged() |
protected void |
onColorChanged()
Invoked when the color property changes
|
protected void |
onFirstItemChanged(PointMapItem prevItem)
Invoked when the firstItem property changes
|
protected void |
onLinkChanged()
Invoked when the link property changes
|
protected void |
onParentChanged()
Invoked when the parent set changes
|
protected void |
onSecondItemChanged(PointMapItem prevItem)
Invoked when the secondItem property changes
|
protected void |
onStrokeWeightChanged()
Invoked when the stroke weight changes
|
protected void |
onStyleChanged()
Invoked when the style property changes
|
protected void |
onTextChanged() |
android.os.Bundle |
preDrawCanvas(CapturePP cap)
Save forwarded points to meta data holder
These will be used later in drawCanvas
|
void |
removeOnClampToGroundChangedListener(Association.OnClampToGroundChangedListener l) |
void |
removeOnColorChangedListener(Association.OnColorChangedListener l)
Remove a 'color' property listener
|
void |
removeOnFirstItemChangedListner(Association.OnFirstItemChangedListener l)
Remove a 'firstItem' property listener
|
void |
removeOnLinkChangedListener(Association.OnLinkChangedListener l)
Remove a 'link' property listener
|
void |
removeOnParentChangedListener(Association.OnParentChangedListener l) |
void |
removeOnSecondItemChangedListner(Association.OnSecondItemChangedListener l)
Remove a 'secondItem' property listener
|
void |
removeOnStrokeWeightChangedListener(Association.OnStrokeWeightChangedListener l)
Remove a 'strokeWeight' property listener
|
void |
removeOnStyleChangedListener(Association.OnStyleChangedListener l)
Remove a 'style' property listener
|
void |
removeOnTextChangedListener(Association.OnTextChangedListener l) |
void |
setBasicLineStyle(int basicLineStyle)
Set the link style
|
void |
setClampToGround(boolean value) |
void |
setColor(int color)
Set the link color
|
void |
setFirstItem(PointMapItem firstItem)
Set the first PointMapItem
|
void |
setLink(int link)
Set the link type
|
void |
setMarker(Marker marker)
Set the marker so the user can click on an association
|
void |
setParent(AssociationSet parent)
Set the parent set for this association
|
void |
setSecondItem(PointMapItem secondItem)
Set the second PointMapItem
|
void |
setStrokeWeight(double strokeWeight)
Set the stroke weight of the link primitive
|
void |
setStyle(int style)
Set the link style
|
void |
setText(java.lang.String text) |
Folder |
toKml()
Note, Association does not implement Exportable since it is typically exported
by parent objects like other shapes.
|
KMZFolder |
toKmz()
Note, Association does not implement Exportable since it is typically exported
by parent objects like other shapes.
|
addOnBasicLineStyleChangedListener, addOnFillColorChangedListener, addOnPointsChangedListener, addOnStrokeColorChangedListener, addOnStrokeWeightChangedListener, addOnStyleChangedListener, addStyleBits, findTouchPoint, getArea, getClickPoint, getFillColor, getGeoPointMetaData, getIconColor, getPerimeterOrLength, getStrokeColor, getStrokeStyle, getTitle, onBasicLineStyleChanged, onFillColorChanged, onPointsChanged, onStrokeColorChanged, onStrokeStyleChanged, removeOnBasicLineStyleChangedListener, removeOnFillColorChangedListener, removeOnPointsChangedListener, removeOnStrokeColorChangedListener, removeOnStrokeWeightChangedListener, removeOnStyleChangedListener, removeStyleBits, setColor, setFillAlpha, setFillColor, setStrokeColor, setStrokeStyle, 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, setAltitudeMode, 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 int LINK_NONE
public static final int LINK_LINE
public static final int STYLE_SOLID
public static final int STYLE_DOTTED
public static final int STYLE_DASHED
public static final int STYLE_OUTLINED
public Association(java.lang.String uid)
public Association(long serialId, MetaDataHolder metadata, java.lang.String uid)
public Association(PointMapItem firstItem, PointMapItem secondItem, java.lang.String uid)
firstItem
- the first point itemsecondItem
- the second point itempublic Association(long serialId, MetaDataHolder metadata, PointMapItem firstItem, PointMapItem secondItem, java.lang.String uid)
public int getColor()
public PointMapItem getFirstItem()
public PointMapItem getSecondItem()
public int getLink()
public int getStyle()
public void addOnLinkChangedListener(Association.OnLinkChangedListener l)
l
- the listenerpublic void removeOnLinkChangedListener(Association.OnLinkChangedListener l)
l
- the listenerpublic void addOnFirstItemChangedListener(Association.OnFirstItemChangedListener l)
l
- the listenerpublic void removeOnFirstItemChangedListner(Association.OnFirstItemChangedListener l)
l
- the listenerpublic void addOnSecondItemChangedListener(Association.OnSecondItemChangedListener l)
l
- the listenerpublic void removeOnSecondItemChangedListner(Association.OnSecondItemChangedListener l)
l
- the listenerpublic void addOnParentChangedListener(Association.OnParentChangedListener l)
public void removeOnParentChangedListener(Association.OnParentChangedListener l)
public void addOnStyleChangedListener(Association.OnStyleChangedListener l)
l
- the listenerpublic void removeOnStyleChangedListener(Association.OnStyleChangedListener l)
l
- the listenerpublic void addOnColorChangedListener(Association.OnColorChangedListener l)
l
- the listenerpublic void removeOnColorChangedListener(Association.OnColorChangedListener l)
l
- the listenerpublic void addOnStrokeWeightChangedListener(Association.OnStrokeWeightChangedListener l)
l
- the listenerpublic void removeOnStrokeWeightChangedListener(Association.OnStrokeWeightChangedListener l)
l
- the listenerpublic void setColor(int color)
public void setStyle(int style)
public void setBasicLineStyle(int basicLineStyle)
setBasicLineStyle
in class Shape
basicLineStyle
- STYLE_SOLID, STYLE_DOTTED, or STYLE_DASHEDpublic int getBasicLineStyle()
Shape
getBasicLineStyle
in class Shape
public void setLink(int link)
link
- LINK_NONE, or LINK_LINEpublic void setFirstItem(PointMapItem firstItem)
firstItem
- the first item (may be null)public void setSecondItem(PointMapItem secondItem)
secondItem
- the second item (may be null)public void setMarker(Marker marker)
marker
- the marker to the user can click on an association.public Marker getMarker()
public PointMapItem getAnchorItem()
AnchoredMapItem
getAnchorItem
in interface AnchoredMapItem
public void setStrokeWeight(double strokeWeight)
setStrokeWeight
in class Shape
strokeWeight
- the stroke weight [0.0, 10.0]public double getStrokeWeight()
getStrokeWeight
in class Shape
public java.lang.String getText()
public void setText(java.lang.String text)
public boolean getClampToGround()
public void setClampToGround(boolean value)
public void setParent(AssociationSet parent)
parent
- Parent set (null to unset)public AssociationSet getParent()
public GeoPointMetaData getCenter()
public void addOnTextChangedListener(Association.OnTextChangedListener l)
public void removeOnTextChangedListener(Association.OnTextChangedListener l)
protected void onTextChanged()
public void addOnClampToGroundChangedListener(Association.OnClampToGroundChangedListener l)
public void removeOnClampToGroundChangedListener(Association.OnClampToGroundChangedListener l)
protected void onClampToGroundChanged()
protected void onLinkChanged()
protected void onStyleChanged()
onStyleChanged
in class Shape
protected void onFirstItemChanged(PointMapItem prevItem)
prevItem
- the previous firstItemprotected void onSecondItemChanged(PointMapItem prevItem)
prevItem
- the previous secondItemprotected void onParentChanged()
protected void onColorChanged()
protected void onStrokeWeightChanged()
onStrokeWeightChanged
in class Shape
public GeoPoint[] getPoints()
Shape
public GeoPointMetaData[] getMetaDataPoints()
Shape
getMetaDataPoints
in class Shape
public GeoBounds getBounds(MutableGeoBounds bounds)
Shape
public Folder toKml()
public KMZFolder toKmz()
public 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