|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nasa.worldwind.avlist.AVListImpl
gov.nasa.worldwind.render.AbstractAnnotation
gov.nasa.worldwind.render.GlobeAnnotation
public class GlobeAnnotation
Represent a text label attached to a Position on the globe and its rendering attributes.
AbstractAnnotation,
AnnotationAttributes| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class gov.nasa.worldwind.render.AbstractAnnotation |
|---|
AbstractAnnotation.TextCacheKey |
| Field Summary | |
|---|---|
protected Integer |
altitudeMode
|
protected double |
heightInMeter
|
protected Position |
position
|
| Fields inherited from class gov.nasa.worldwind.render.AbstractAnnotation |
|---|
alwaysOnTop, attributes, childList, delegateOwner, layoutManager, maxActiveAltitude, minActiveAltitude, pickEnabled, pickSupport, text, textBoundsMap, vertexBuffer, wrappedTextMap |
| Fields inherited from interface gov.nasa.worldwind.render.Annotation |
|---|
ANTIALIAS_DONT_CARE, ANTIALIAS_FASTEST, ANTIALIAS_NICEST |
| Constructor Summary | |
|---|---|
GlobeAnnotation(String text,
Position position)
Creates a GlobeAnnotation with the given text, at the given globe Position. |
|
GlobeAnnotation(String text,
Position position,
AnnotationAttributes defaults)
Creates a GlobeAnnotation with the given text, at the given globe Position. |
|
GlobeAnnotation(String text,
Position position,
Font font)
Creates a GlobeAnnotation with the given text, at the given globe Position. |
|
GlobeAnnotation(String text,
Position position,
Font font,
Color textColor)
Creates a GlobeAnnotation with the given text, at the given globe Position. |
|
| Method Summary | |
|---|---|
protected Rectangle |
computeBounds(DrawContext dc)
|
protected double[] |
computeDistanceScaleAndOpacity(DrawContext dc,
Vec4 point,
Dimension size)
|
protected Double |
computeLookAtDistance(DrawContext dc)
|
protected void |
doRenderNow(DrawContext dc)
|
Integer |
getAltitudeMode()
Get the annotation's altitude mode. |
Vec4 |
getAnnotationDrawPoint(DrawContext dc)
Get the final Vec4 point at which an annotation will be drawn. |
protected Vec4 |
getAnnotationDrawPointLegacy(DrawContext dc)
Compute the draw point using the legacy altitude mode. |
double |
getHeightInMeter()
Returns the real world height of the annotation frame in meter. |
Position |
getPosition()
|
Position |
getReferencePosition()
A position associated with the object that indicates its aggregate geographic position. |
String |
getRestorableState()
Returns an XML state document String describing the public attributes of this GlobeAnnotation. |
void |
move(Position position)
Shift the shape over the globe's surface while maintaining its original azimuth, its orientation relative to North. |
void |
moveTo(Position position)
Move the shape over the globe's surface while maintaining its original azimuth, its orientation relative to North. |
void |
restoreState(String stateInXml)
Restores publicly settable attribute values found in the specified XML state document String. |
void |
setAltitudeMode(Integer altitudeMode)
Set the annotation's altitude mode. |
protected void |
setDepthFunc(DrawContext dc,
Vec4 screenPoint)
|
void |
setHeightInMeter(double meters)
Set the real world height of the annotation frame in meter. |
void |
setPosition(Position position)
|
| Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl |
|---|
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Integer altitudeMode
protected double heightInMeter
protected Position position
| Constructor Detail |
|---|
public GlobeAnnotation(String text,
Position position)
GlobeAnnotation with the given text, at the given globe Position.
text - the annotation text.position - the annotation Position.
public GlobeAnnotation(String text,
Position position,
AnnotationAttributes defaults)
GlobeAnnotation with the given text, at the given globe Position. Specify the
default AnnotationAttributes set.
text - the annotation text.position - the annotation Position.defaults - the default AnnotationAttributes set.
public GlobeAnnotation(String text,
Position position,
Font font)
GlobeAnnotation with the given text, at the given globe Position. Specify
the Font to be used.
text - the annotation text.position - the annotation Position.font - the Font to use.
public GlobeAnnotation(String text,
Position position,
Font font,
Color textColor)
GlobeAnnotation with the given text, at the given globe Position. Specify
the Font and text Color to be used.
text - the annotation text.position - the annotation Position.font - the Font to use.textColor - the text Color.| Method Detail |
|---|
protected Rectangle computeBounds(DrawContext dc)
computeBounds in class AbstractAnnotation
protected double[] computeDistanceScaleAndOpacity(DrawContext dc,
Vec4 point,
Dimension size)
protected Double computeLookAtDistance(DrawContext dc)
protected void doRenderNow(DrawContext dc)
doRenderNow in class AbstractAnnotationpublic Integer getAltitudeMode()
WorldWind.CLAMP_TO_GROUND, WorldWind.RELATIVE_TO_GROUND, WorldWind.ABSOLUTE, or null.setAltitudeMode(Integer)public Vec4 getAnnotationDrawPoint(DrawContext dc)
getAltitudeMode() will be used to determine the point.
dc - the current DrawContext.
getAltitudeMode()protected Vec4 getAnnotationDrawPointLegacy(DrawContext dc)
getAltitudeMode() for details on the legacy
mode.
dc - the current DrawContext.
getAltitudeMode()public double getHeightInMeter()
public Position getPosition()
getPosition in interface Locatablepublic Position getReferencePosition()
Movable
getReferencePosition in interface Movablepublic String getRestorableState()
getRestorableState in interface RestorablegetRestorableState in class AbstractAnnotationpublic void move(Position position)
Movable
move in interface Movableposition - the latitude and longitude to add to the shape's reference position.public void moveTo(Position position)
Movable
moveTo in interface Movableposition - the new position of the shape's reference position.public void restoreState(String stateInXml)
stateInXml must be a well formed XML document String, or this will throw an
IllegalArgumentException. Unknown structures in stateInXml are benign, because they will simply be
ignored.
restoreState in interface RestorablerestoreState in class AbstractAnnotationstateInXml - an XML document String describing a GlobeAnnotation.
IllegalArgumentException - If stateInXml is null, or if stateInXml is not a well
formed XML document String.public void setAltitudeMode(Integer altitudeMode)
altitudeMode - The altitude mode, one of WorldWind.CLAMP_TO_GROUND, WorldWind.RELATIVE_TO_GROUND, or WorldWind.ABSOLUTE. null indicates that the
legacy altitude mode should be used. See getAltitudeMode() for details on this
mode.getAltitudeMode()
protected void setDepthFunc(DrawContext dc,
Vec4 screenPoint)
public void setHeightInMeter(double meters)
meters - the real world height of the annotation frame in meter.public void setPosition(Position position)
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||