public class Ellipse extends Polyline
Modifier and Type | Class and Description |
---|---|
static interface |
Ellipse.OnEllipseFillTypeChangedListener
Listen for property fill changes on the Ellipse.
|
static interface |
Ellipse.OnEllipsePropertiesChangedListener
Listen for property changes on the Ellipse.
|
Polyline.OnAltitudeModeChangedListener, Polyline.OnHeightStyleChangedListener, Polyline.OnLabelsChangedListener, Polyline.OnLabelTextSizeChanged
Shape.OnBasicLineStyleChangedListener, Shape.OnFillColorChangedListener, Shape.OnPointsChangedListener, Shape.OnStrokeColorChangedListener, Shape.OnStrokeWeightChangedListener, Shape.OnStyleChangedListener
MapItem.OnClickableChangedListener, MapItem.OnGroupChangedListener, MapItem.OnHeightChangedListener, MapItem.OnMetadataChangedListener, MapItem.OnTypeChangedListener, MapItem.OnVisibleChangedListener, MapItem.OnZOrderChangedListener
_points, DEFAULT_MAX_LABEL_RENDER_RESOLUTION, DEFAULT_MAX_LINE_RENDER_RESOLUTION, DEFAULT_MIN_LABEL_RENDER_RESOLUTION, DEFAULT_MIN_LINE_RENDER_RESOLUTION, HEIGHT_EXTRUDE_CENTER_ALT, HEIGHT_EXTRUDE_DEFAULT, HEIGHT_EXTRUDE_MAX_ALT, HEIGHT_EXTRUDE_MIN_ALT, HEIGHT_EXTRUDE_PER_POINT, HEIGHT_STYLE_NONE, HEIGHT_STYLE_OUTLINE, HEIGHT_STYLE_OUTLINE_SIMPLE, HEIGHT_STYLE_POLYGON, HEIGHT_STYLE_TOP_ONLY, minimumBoundingBox, PARTITION_SIZE, STYLE_CLOSED_MASK, STYLE_OUTLINE_HALO_MASK, STYLE_OUTLINE_STROKE_MASK
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 |
---|
Ellipse(long serialId,
MetaDataHolder metadata,
java.lang.String uid) |
Ellipse(java.lang.String uid) |
Modifier and Type | Method and Description |
---|---|
void |
addOnEllipseFillTypeChangedListener(Ellipse.OnEllipseFillTypeChangedListener l)
Add a listener to know when the fill type for an ellipse is changed.
|
void |
addOnEllipsePropChangedListener(Ellipse.OnEllipsePropertiesChangedListener l)
Add a listener to know when any of the ellipse properties are changed.
|
double |
getAngle()
Returns the angle for the ellipse
|
double |
getArea()
Returns the Area of the shape in meters
|
GeoPointMetaData |
getCenter()
Provides the center point for the Shape, or null if an error has occurred.
|
int |
getFillStyle()
Returns the fill style for this ellipse.
|
double |
getLength()
Returns the length (parallel diameter) of the ellipse
|
double |
getMajorAxis()
Get the major axis diameter
|
double |
getMajorRadius()
Get the major axis radius
|
double |
getMinorAxis()
Get the minor axis diameter
|
double |
getMinorRadius()
Get the minor axis radius
|
double |
getPerimeterOrLength()
Returns the perimeter of a shape if closed otherwise will return the length of
of the open shape from start to end.
|
int |
getSweepEnd()
Returns the sweep end.
|
int |
getSweepStart()
Returns the sweep start.
|
double |
getWidth()
Returns the width (perpendicular diameter) of the ellipse
|
void |
removeOnEllipseFillTypeChangedListener(Ellipse.OnEllipseFillTypeChangedListener l)
Remove a listener registered to listen when the fill type is changed.
|
void |
removeOnEllipsePropChangedListener(Ellipse.OnEllipsePropertiesChangedListener l)
Remove a listener when any of the ellipse properties are changed.
|
void |
setAltitudeMode(AltitudeMode altMode)
Set the altitude mode for this item
See
AltitudeMode for possible values |
void |
setAngle(double newAngle)
Set the new angle of rotation for the ellipse
|
protected boolean |
setAngleImpl(double newAngle) |
void |
setCenter(GeoPointMetaData newCenter)
Set the new center point for the ellipse.
|
void |
setCenterHeightWidth(GeoPointMetaData newCenter,
double newH,
double newW)
Deprecated.
|
void |
setCenterHeightWidthAngle(GeoPointMetaData newCenter,
double newH,
double newW,
double newAngle)
Deprecated.
|
protected boolean |
setCenterImpl(GeoPointMetaData newCenter) |
void |
setDimensions(double minorRadius,
double majorRadius)
Sets the dimensions of the ellipse using the minor and major values in meters
|
void |
setDimensions(GeoPointMetaData center,
double minorRadius,
double majorRadius)
Sets the dimensions and location of the ellipse using the minor and major values in meters
|
void |
setDimensions(GeoPointMetaData center,
double minorRadius,
double majorRadius,
double angle)
Sets the dimensions and location of the ellipse using the minor and major values in meters
Based on the CoT Shape Schema, the angle represents the orientation of
the major axis.
|
void |
setFillStyle(int newFill)
Sets the fill style
|
void |
setHeightWidth(double newH,
double newW)
Deprecated.
|
void |
setLength(double length)
Sets the length (parallel diameter) of the ellipse
|
void |
setMajorRadius(double radius)
Set the radius of the major axis
The major axis is the longer diameter in the ellipse
It's recommended to use
setWidth(double)
or setLength(double) instead |
protected boolean |
setMajorRadiusImpl(double radius) |
void |
setMinorRadius(double radius)
Set the radius of the minor axis
The minor axis is the shorter diameter in the ellipse
It's recommended to use
setWidth(double)
or setLength(double) instead |
protected boolean |
setMinorRadiusImpl(double radius) |
void |
setSweep(int start,
int end)
Sets a sweep for a ellipse.
|
void |
setWidth(double width)
Sets the width (perpendicular diameter) of the ellipse
|
addHeightStyle, addOnHeightStyleChangedListener, addOnLabelsChangedListener, addOnLabelTextSizeChangedListener, drawCanvas, getBounds, getHeightExtrudeMode, getHeightStyle, getLabels, getLabelTextSize, getLabelTypeface, getLineLabel, getMetaDataPoints, getPoints, getPoints, getPoints, getRelativeBounds, getTotalDistance, onHeightStyleChanged, onLabelsChanged, onLabelTextSizeChanged, onMetadataChanged, onPointsChanged, preDrawCanvas, removeHeightStyle, removeOnHeightStyleChangedListener, removeOnLabelsChangedListener, removeOnLabelTextSizeChangedListner, setHeightExtrudeMode, setHeightStyle, setLabels, setLabelTextSize, setLabelTextSize, setLabelTextTypeface, setLineLabel, setMaxLabelRenderResolution, setMaxRenderResolution, setMinLabelRenderResolution, setMinRenderResolution, setPoints, setPoints, setPoints, setPoints
addOnBasicLineStyleChangedListener, addOnFillColorChangedListener, addOnPointsChangedListener, addOnStrokeColorChangedListener, addOnStrokeWeightChangedListener, addOnStyleChangedListener, addStyleBits, findTouchPoint, getBasicLineStyle, getClickPoint, getFillColor, getGeoPointMetaData, getIconColor, getStrokeColor, getStrokeStyle, getStrokeWeight, getStyle, getTitle, onBasicLineStyleChanged, onFillColorChanged, 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, 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 Ellipse(java.lang.String uid)
public Ellipse(long serialId, MetaDataHolder metadata, java.lang.String uid)
public void addOnEllipsePropChangedListener(Ellipse.OnEllipsePropertiesChangedListener l)
l
- the listener to addpublic void removeOnEllipsePropChangedListener(Ellipse.OnEllipsePropertiesChangedListener l)
l
- the listener to removepublic void addOnEllipseFillTypeChangedListener(Ellipse.OnEllipseFillTypeChangedListener l)
l
- the listener to addpublic void removeOnEllipseFillTypeChangedListener(Ellipse.OnEllipseFillTypeChangedListener l)
l
- the listener to addpublic void setAngle(double newAngle)
newAngle
- the angle of rotation in degrees true north.protected boolean setAngleImpl(double newAngle)
public double getAngle()
public double getWidth()
public void setWidth(double width)
width
- Width in meterspublic double getLength()
public void setLength(double length)
length
- Length in meterspublic void setMajorRadius(double radius)
setWidth(double)
or setLength(double)
insteadradius
- Radius in metersprotected boolean setMajorRadiusImpl(double radius)
public double getMajorRadius()
public double getMajorAxis()
public void setMinorRadius(double radius)
setWidth(double)
or setLength(double)
insteadradius
- Radius in metersprotected boolean setMinorRadiusImpl(double radius)
public double getMinorRadius()
public double getMinorAxis()
public void setCenter(GeoPointMetaData newCenter)
newCenter
- the new centerpoint.protected boolean setCenterImpl(GeoPointMetaData newCenter)
public GeoPointMetaData getCenter()
Shape
public void setDimensions(double minorRadius, double majorRadius)
minorRadius
- the minor radius in metersmajorRadius
- the major radius in meterspublic void setDimensions(GeoPointMetaData center, double minorRadius, double majorRadius)
center
- the center of the elipseminorRadius
- the minor radius in metersmajorRadius
- the major radius in meterspublic void setDimensions(GeoPointMetaData center, double minorRadius, double majorRadius, double angle)
center
- the center of the ellipseminorRadius
- the minor radius in metersmajorRadius
- the major radius in metersangle
- the angle of the ellipse in degrees clock wise.public int getSweepStart()
public int getSweepEnd()
public void setSweep(int start, int end)
start
- must be a number ranging from [0, 360].end
- must be a number ranging from [0, 360].public void setFillStyle(int newFill)
newFill
- the fill style one 1 for filled or 0 for unfilled.public int getFillStyle()
public void setAltitudeMode(AltitudeMode altMode)
MapItem
AltitudeMode
for possible valuessetAltitudeMode
in class MapItem
altMode
- Altitude modepublic double getArea()
Shape
public double getPerimeterOrLength()
Shape
getPerimeterOrLength
in class Polyline
@Deprecated public void setHeightWidth(double newH, double newW)
setDimensions(double, double)
newW
- the width in meters.newH
- the height in meters.@Deprecated public void setCenterHeightWidth(GeoPointMetaData newCenter, double newH, double newW)
setDimensions(GeoPointMetaData, double, double)
newCenter
- the center of the ellipse.newW
- the width in meters.newH
- the height in meters.@Deprecated public void setCenterHeightWidthAngle(GeoPointMetaData newCenter, double newH, double newW, double newAngle)
setDimensions(GeoPointMetaData, double, double, double)
newCenter
- the center of the ellipse.newW
- the width in meters.newH
- the height in meters.newAngle
- the angle in degrees