Class SARAnnotationSupport
- java.lang.Object
-
- gov.nasa.worldwindx.applications.sar.SARAnnotationSupport
-
public class SARAnnotationSupport extends java.lang.ObjectHandles SAR annotations
-
-
Constructor Summary
Constructors Constructor Description SARAnnotationSupport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(SARAnnotation annotation)Add an annotation.voidaddNew(SARAnnotation annotation, SARTrack owner)voidaddNew(java.lang.String text, SARTrack owner)Add a new annotation in the screen center.voidedit(SARAnnotation annotation)Edit an annotation.java.lang.StringgetAngleFormat()java.lang.Iterable<Annotation>getAnnotations()Get the annotation collection from the RenderableLayerjava.lang.Iterable<SARAnnotation>getAnnotationsForTrack(SARTrack owner)SARAnnotationgetCurrent()Get current annotation.AnnotationAttributesgetDefaults()Get the default attribute set used for all annotations.booleangetEnabled()Get the annotations enabled state.WorldWindowgetWwd()voidreadAnnotations(java.lang.String filePath, SARTrack trackOwner)voidremove(SARAnnotation annotation)Remove an annotation.voidremoveAnnotationsForTrack(SARTrack owner)voidsetAngleFormat(java.lang.String format)voidsetEnabled(boolean state)Set annotations enabled statevoidsetWwd(WorldWindow wwd)Set the WorldWindow reference.voidwriteAnnotations(java.lang.String filePath, SARTrack trackOwner)
-
-
-
Method Detail
-
setWwd
public void setWwd(WorldWindow wwd)
Set the WorldWindow reference. Adds an annotation layer and a SelectListener to WW.- Parameters:
wwd- the WorldWindow reference.
-
getWwd
public WorldWindow getWwd()
-
getAngleFormat
public java.lang.String getAngleFormat()
-
setAngleFormat
public void setAngleFormat(java.lang.String format)
-
addNew
public void addNew(java.lang.String text, SARTrack owner)Add a new annotation in the screen center.- Parameters:
text- theAnnotationtext.owner- if not null, the SARTrack to add the annotation to. annotation's border and text will be colored according to the owner SARTrack.
-
addNew
public void addNew(SARAnnotation annotation, SARTrack owner)
-
add
public void add(SARAnnotation annotation)
Add an annotation.- Parameters:
annotation- the annotation to add.
-
edit
public void edit(SARAnnotation annotation)
Edit an annotation.- Parameters:
annotation- the Annotation to be edited.
-
remove
public void remove(SARAnnotation annotation)
Remove an annotation.- Parameters:
annotation- the annotation to be removed.
-
removeAnnotationsForTrack
public void removeAnnotationsForTrack(SARTrack owner)
-
getCurrent
public SARAnnotation getCurrent()
Get current annotation.- Returns:
- current annotation.
-
getAnnotations
public java.lang.Iterable<Annotation> getAnnotations()
Get the annotation collection from the RenderableLayer- Returns:
- an Annotation collection.
-
getAnnotationsForTrack
public java.lang.Iterable<SARAnnotation> getAnnotationsForTrack(SARTrack owner)
-
setEnabled
public void setEnabled(boolean state)
Set annotations enabled state- Parameters:
state- true if annotations should be enabled.
-
getEnabled
public boolean getEnabled()
Get the annotations enabled state.- Returns:
- true if annotations are enabled.
-
getDefaults
public AnnotationAttributes getDefaults()
Get the default attribute set used for all annotations.- Returns:
- the default attribute set used for all annotations.
-
writeAnnotations
public void writeAnnotations(java.lang.String filePath, SARTrack trackOwner) throws java.io.IOException- Throws:
java.io.IOException
-
readAnnotations
public void readAnnotations(java.lang.String filePath, SARTrack trackOwner) throws java.io.IOException- Throws:
java.io.IOException
-
-