NASA World Wind

gov.nasa.worldwind.applications.sar
Class SARAnnotationSupport

java.lang.Object
  extended by gov.nasa.worldwind.applications.sar.SARAnnotationSupport

public class SARAnnotationSupport
extends java.lang.Object

Handles SAR annotations


Constructor Summary
SARAnnotationSupport()
           
 
Method Summary
 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.Iterable<Annotation> getAnnotations()
          Get the annotation collection from the RenderableLayer
 java.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 setEnabled(boolean state)
          Set annotations enabled state
 void setWwd(WorldWindow wwd)
          Set the WorldWindow reference.
 void writeAnnotations(java.lang.String filePath, SARTrack trackOwner)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SARAnnotationSupport

public SARAnnotationSupport()
Method Detail

add

public void add(SARAnnotation annotation)
Add an annotation.

Parameters:
annotation - the annotation to add.

addNew

public void addNew(SARAnnotation annotation,
                   SARTrack owner)

addNew

public void addNew(java.lang.String text,
                   SARTrack owner)
Add a new annotation in the screen center.

Parameters:
text - the Annotation 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.

edit

public void edit(SARAnnotation annotation)
Edit an annotation.

Parameters:
annotation - the Annotation to be edited.

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)

getCurrent

public SARAnnotation getCurrent()
Get current annotation.

Returns:
current annotation.

getDefaults

public AnnotationAttributes getDefaults()
Get the default attribute set used for all annotations.

Returns:
the default attribute set used for all annotations.

getEnabled

public boolean getEnabled()
Get the annotations enabled state.

Returns:
true if annotations are enabled.

getWwd

public WorldWindow getWwd()

readAnnotations

public void readAnnotations(java.lang.String filePath,
                            SARTrack trackOwner)
                     throws java.io.IOException
Throws:
java.io.IOException

remove

public void remove(SARAnnotation annotation)
Remove an annotation.

Parameters:
annotation - the annotation to be removed.

removeAnnotationsForTrack

public void removeAnnotationsForTrack(SARTrack owner)

setEnabled

public void setEnabled(boolean state)
Set annotations enabled state

Parameters:
state - true if annotations should be enabled.

setWwd

public void setWwd(WorldWindow wwd)
Set the WorldWindow reference. Adds an annotation layer and a SelectListener to WW.

Parameters:
wwd - the WorldWindow reference.

writeAnnotations

public void writeAnnotations(java.lang.String filePath,
                             SARTrack trackOwner)
                      throws java.io.IOException
Throws:
java.io.IOException

NASA World Wind