Package gov.nasa.worldwind.render
Interface Annotation
-
- All Superinterfaces:
Disposable,Renderable,Restorable
- All Known Implementing Classes:
AbstractAnnotation,AudioPlayerAnnotation,ButtonAnnotation,DialogAnnotation,DialogAnnotation.BusyImage,EditorAnnotation,GlobeAnnotation,ImageAnnotation,MeasureTool.ControlPoint,MeasureTool.ControlPointWithLeader,ProgressAnnotation,SARAnnotation,ScreenAnnotation,ScreenRelativeAnnotation,SlideShowAnnotation,ToolTipAnnotation,ToolTipAnnotation,WWOMeasureToolControlPoints.ControlPoint
public interface Annotation extends Renderable, Disposable, Restorable
Represent a text label and its rendering attributes.
-
-
Field Summary
Fields Modifier and Type Field Description static intANTIALIAS_DONT_CAREstatic intANTIALIAS_FASTESTstatic intANTIALIAS_NICEST
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddChild(Annotation annotation)voiddraw(DrawContext dc, int width, int height, double opacity, Position pickPosition)Draws the annotation without transforming to its screen position, or applying any scaling.AnnotationAttributesgetAttributes()java.awt.RectanglegetBounds(DrawContext dc)Get the annotation boundingRectangleusing OGL coordinates - bottom-left corner x and y relative to theWorldWindowbottom-left corner, and the annotation callout width and height.java.util.List<? extends Annotation>getChildren()java.lang.ObjectgetDelegateOwner()AnnotationLayoutManagergetLayout()doublegetMaxActiveAltitude()Returns the maximum eye altitude, in meters, for which the annotation is displayed.doublegetMinActiveAltitude()Returns the minimum eye altitude, in meters, for which the annotation is displayed.PickSupportgetPickSupport()java.awt.DimensiongetPreferredSize(DrawContext dc)java.lang.StringgetText()booleanisAlwaysOnTop()booleanisPickEnabled()voidremoveAllChildren()booleanremoveChild(Annotation annotation)voidrenderNow(DrawContext dc)Draws the annotation immediately on the specified DrawContext.voidsetAlwaysOnTop(boolean alwaysOnTop)voidsetAttributes(AnnotationAttributes attrs)voidsetDelegateOwner(java.lang.Object delegateOwner)voidsetLayout(AnnotationLayoutManager layoutManager)voidsetMaxActiveAltitude(double maxActiveAltitude)Specifies the maximum eye altitude, in meters, for which the annotation is displayed.voidsetMinActiveAltitude(double minActiveAltitude)Specifies the minimum eye altitude, in meters, for which the annotation is displayed.voidsetPickEnabled(boolean enable)voidsetPickSupport(PickSupport pickSupport)voidsetText(java.lang.String text)-
Methods inherited from interface gov.nasa.worldwind.Disposable
dispose
-
Methods inherited from interface gov.nasa.worldwind.render.Renderable
render
-
Methods inherited from interface gov.nasa.worldwind.Restorable
getRestorableState, restoreState
-
-
-
-
Field Detail
-
ANTIALIAS_DONT_CARE
static final int ANTIALIAS_DONT_CARE
- See Also:
- Constant Field Values
-
ANTIALIAS_FASTEST
static final int ANTIALIAS_FASTEST
- See Also:
- Constant Field Values
-
ANTIALIAS_NICEST
static final int ANTIALIAS_NICEST
- See Also:
- Constant Field Values
-
-
Method Detail
-
isAlwaysOnTop
boolean isAlwaysOnTop()
-
setAlwaysOnTop
void setAlwaysOnTop(boolean alwaysOnTop)
-
isPickEnabled
boolean isPickEnabled()
-
setPickEnabled
void setPickEnabled(boolean enable)
-
getText
java.lang.String getText()
-
setText
void setText(java.lang.String text)
-
getAttributes
AnnotationAttributes getAttributes()
-
setAttributes
void setAttributes(AnnotationAttributes attrs)
-
getChildren
java.util.List<? extends Annotation> getChildren()
-
addChild
void addChild(Annotation annotation)
-
removeChild
boolean removeChild(Annotation annotation)
-
removeAllChildren
void removeAllChildren()
-
getLayout
AnnotationLayoutManager getLayout()
-
setLayout
void setLayout(AnnotationLayoutManager layoutManager)
-
getPickSupport
PickSupport getPickSupport()
-
setPickSupport
void setPickSupport(PickSupport pickSupport)
-
getDelegateOwner
java.lang.Object getDelegateOwner()
-
setDelegateOwner
void setDelegateOwner(java.lang.Object delegateOwner)
-
getPreferredSize
java.awt.Dimension getPreferredSize(DrawContext dc)
-
renderNow
void renderNow(DrawContext dc)
Draws the annotation immediately on the specified DrawContext. Rendering is not be delayed by use of the DrawContext's ordered mechanism, or any other delayed rendering mechanism. This is typically called by an AnnotationRenderer while batch rendering. The GL should have its model view set to the identity matrix.- Parameters:
dc- the current DrawContext.- Throws:
java.lang.IllegalArgumentException- ifdcis null.
-
draw
void draw(DrawContext dc, int width, int height, double opacity, Position pickPosition)
Draws the annotation without transforming to its screen position, or applying any scaling. This Annotation is draw with the specified width, height, and opacity. The GL should have its model view set to whatever transformation is desired.- Parameters:
dc- the current DrawContext.width- the width of the Annotation.height- the height of the Annotation.opacity- the opacity of the Annotation.pickPosition- the picked Position assigned to the Annotation, if picking is enabled.- Throws:
java.lang.IllegalArgumentException- ifdcis null.
-
getBounds
java.awt.Rectangle getBounds(DrawContext dc)
Get the annotation boundingRectangleusing OGL coordinates - bottom-left corner x and y relative to theWorldWindowbottom-left corner, and the annotation callout width and height.The annotation offset from it's reference point is factored in such that the callout leader shape and reference point are included in the bounding rectangle.
- Parameters:
dc- the current DrawContext.- Returns:
- the annotation bounding
Rectangleusing OGL viewport coordinates. - Throws:
java.lang.IllegalArgumentException- ifdcis null.
-
getMinActiveAltitude
double getMinActiveAltitude()
Returns the minimum eye altitude, in meters, for which the annotation is displayed.- Returns:
- the minimum altitude, in meters, for which the annotation is displayed.
- See Also:
setMinActiveAltitude(double),getMaxActiveAltitude()
-
setMinActiveAltitude
void setMinActiveAltitude(double minActiveAltitude)
Specifies the minimum eye altitude, in meters, for which the annotation is displayed.- Parameters:
minActiveAltitude- the minimum altitude, in meters, for which the annotation is displayed.- See Also:
getMinActiveAltitude(),setMaxActiveAltitude(double)
-
getMaxActiveAltitude
double getMaxActiveAltitude()
Returns the maximum eye altitude, in meters, for which the annotation is displayed.- Returns:
- the maximum altitude, in meters, for which the annotation is displayed.
- See Also:
setMaxActiveAltitude(double),getMinActiveAltitude()
-
setMaxActiveAltitude
void setMaxActiveAltitude(double maxActiveAltitude)
Specifies the maximum eye altitude, in meters, for which the annotation is displayed.- Parameters:
maxActiveAltitude- the maximum altitude, in meters, for which the annotation is displayed.- See Also:
getMaxActiveAltitude(),setMinActiveAltitude(double)
-
-