Class SARAnnotationSupport
- java.lang.Object
-
- gov.nasa.worldwindx.applications.sar.SARAnnotationSupport
-
public class SARAnnotationSupport extends java.lang.Object
Handles SAR annotations
-
-
Constructor Summary
Constructors Constructor Description SARAnnotationSupport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(SARAnnotation annotation)
Add an annotation.void
addNew(SARAnnotation annotation, SARTrack owner)
void
addNew(java.lang.String text, SARTrack owner)
Add a new annotation in the screen center.void
edit(SARAnnotation annotation)
Edit an annotation.java.lang.String
getAngleFormat()
java.lang.Iterable<Annotation>
getAnnotations()
Get the annotation collection from the RenderableLayerjava.lang.Iterable<SARAnnotation>
getAnnotationsForTrack(SARTrack owner)
SARAnnotation
getCurrent()
Get current annotation.AnnotationAttributes
getDefaults()
Get the default attribute set used for all annotations.boolean
getEnabled()
Get the annotations enabled state.WorldWindow
getWwd()
void
readAnnotations(java.lang.String filePath, SARTrack trackOwner)
void
remove(SARAnnotation annotation)
Remove an annotation.void
removeAnnotationsForTrack(SARTrack owner)
void
setAngleFormat(java.lang.String format)
void
setEnabled(boolean state)
Set annotations enabled statevoid
setWwd(WorldWindow wwd)
Set the WorldWindow reference.void
writeAnnotations(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
- theAnnotation
text.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
-
-