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 int
ANTIALIAS_DONT_CARE
static int
ANTIALIAS_FASTEST
static int
ANTIALIAS_NICEST
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addChild(Annotation annotation)
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.AnnotationAttributes
getAttributes()
java.awt.Rectangle
getBounds(DrawContext dc)
Get the annotation boundingRectangle
using OGL coordinates - bottom-left corner x and y relative to theWorldWindow
bottom-left corner, and the annotation callout width and height.java.util.List<? extends Annotation>
getChildren()
java.lang.Object
getDelegateOwner()
AnnotationLayoutManager
getLayout()
double
getMaxActiveAltitude()
Returns the maximum eye altitude, in meters, for which the annotation is displayed.double
getMinActiveAltitude()
Returns the minimum eye altitude, in meters, for which the annotation is displayed.PickSupport
getPickSupport()
java.awt.Dimension
getPreferredSize(DrawContext dc)
java.lang.String
getText()
boolean
isAlwaysOnTop()
boolean
isPickEnabled()
void
removeAllChildren()
boolean
removeChild(Annotation annotation)
void
renderNow(DrawContext dc)
Draws the annotation immediately on the specified DrawContext.void
setAlwaysOnTop(boolean alwaysOnTop)
void
setAttributes(AnnotationAttributes attrs)
void
setDelegateOwner(java.lang.Object delegateOwner)
void
setLayout(AnnotationLayoutManager layoutManager)
void
setMaxActiveAltitude(double maxActiveAltitude)
Specifies the maximum eye altitude, in meters, for which the annotation is displayed.void
setMinActiveAltitude(double minActiveAltitude)
Specifies the minimum eye altitude, in meters, for which the annotation is displayed.void
setPickEnabled(boolean enable)
void
setPickSupport(PickSupport pickSupport)
void
setText(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
- ifdc
is 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
- ifdc
is null.
-
getBounds
java.awt.Rectangle getBounds(DrawContext dc)
Get the annotation boundingRectangle
using OGL coordinates - bottom-left corner x and y relative to theWorldWindow
bottom-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
Rectangle
using OGL viewport coordinates. - Throws:
java.lang.IllegalArgumentException
- ifdc
is 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)
-
-