|
NASA World Wind | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.worldwind.render.AbstractAnnotation
gov.nasa.worldwind.render.ScreenAnnotation
public class ScreenAnnotation
Represent a text label attached to a Point on the viewport and its rendering attributes.
AbstractAnnotation
,
AnnotationAttributes
Field Summary |
---|
Fields inherited from class gov.nasa.worldwind.render.AbstractAnnotation |
---|
alphaFactor, attributes, delegateOwner, drawRectangle, freeRectangle, renderInfo, scaleFactor, text |
Fields inherited from interface gov.nasa.worldwind.render.Annotation |
---|
ANTIALIAS_DONT_CARE, ANTIALIAS_FASTEST, ANTIALIAS_NICEST, IMAGE_REPEAT_NONE, IMAGE_REPEAT_X, IMAGE_REPEAT_XY, IMAGE_REPEAT_Y, SIZE_FIT_TEXT, SIZE_FIXED |
Constructor Summary | |
---|---|
ScreenAnnotation(java.lang.String text,
java.awt.Point position)
Creates a ScreenAnnotation with the given text, at the given viewport position. |
|
ScreenAnnotation(java.lang.String text,
java.awt.Point position,
AnnotationAttributes defaults)
Creates a ScreenAnnotation with the given text, at the given viewport position. |
|
ScreenAnnotation(java.lang.String text,
java.awt.Point position,
java.awt.Font font)
Creates a ScreenAnnotation with the given text, at the given viewport position. |
|
ScreenAnnotation(java.lang.String text,
java.awt.Point position,
java.awt.Font font,
java.awt.Color textColor)
Creates a ScreenAnnotation with the given text, at the given viewport position. |
Method Summary | |
---|---|
protected void |
doDraw(DrawContext dc)
|
java.lang.String |
getRestorableState()
Returns an XML state document String describing the public attributes of this ScreenAnnotation. |
java.awt.Point |
getScreenPoint()
Get the Point where the annotation is drawn in the viewport. |
void |
restoreState(java.lang.String stateInXml)
Restores publicly settable attribute values found in the specified XML state document String. |
void |
setScreenPoint(java.awt.Point position)
Set the Point where the annotation will be drawn in the viewport. |
Methods inherited from class gov.nasa.worldwind.render.AbstractAnnotation |
---|
cacheRenderInfo, computeLookAtDistance, dispose, draw, drawAnnotation, getAttributes, getDelegateOwner, getPickSupport, getRectangleInViewportCoordinates, getRenderInfo, getText, getTextRenderer, initializeTexture, isAlwaysOnTop, pick, render, setAlwaysOnTop, setAttributes, setDelegateOwner, setDepthFunc, setDrawColor, setDrawColor, setPickSupport, setText |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ScreenAnnotation(java.lang.String text, java.awt.Point position)
ScreenAnnotation
with the given text, at the given viewport position.
text
- the annotation text.position
- the annotation viewport position.public ScreenAnnotation(java.lang.String text, java.awt.Point position, AnnotationAttributes defaults)
ScreenAnnotation
with the given text, at the given viewport position.
Specify the default AnnotationAttributes
set.
text
- the annotation text.position
- the annotation viewport position.defaults
- the default AnnotationAttributes
set.public ScreenAnnotation(java.lang.String text, java.awt.Point position, java.awt.Font font)
ScreenAnnotation
with the given text, at the given viewport position.
Specifiy the Font
to be used.
text
- the annotation text.position
- the annotation viewport position.font
- the Font
to use.public ScreenAnnotation(java.lang.String text, java.awt.Point position, java.awt.Font font, java.awt.Color textColor)
ScreenAnnotation
with the given text, at the given viewport position.
Specifiy the Font
and text Color
to be used.
text
- the annotation text.position
- the annotation viewport position.font
- the Font
to use.textColor
- the text Color
.Method Detail |
---|
protected void doDraw(DrawContext dc)
doDraw
in class AbstractAnnotation
public java.lang.String getRestorableState()
getRestorableState
in interface Restorable
getRestorableState
in class AbstractAnnotation
public java.awt.Point getScreenPoint()
Point
where the annotation is drawn in the viewport.
Point
where the annotation is drawn in the viewport.public void restoreState(java.lang.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 Restorable
restoreState
in class AbstractAnnotation
stateInXml
- an XML document String describing a ScreenAnnotation.
java.lang.IllegalArgumentException
- If stateInXml
is null, or if stateInXml
is not
a well formed XML document String.public void setScreenPoint(java.awt.Point position)
Point
where the annotation will be drawn in the viewport.
position
- the Point
where the annotation will be drawn in the viewport.
|
NASA World Wind | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |