Class SARAnnotationSupport


  • public class SARAnnotationSupport
    extends java.lang.Object
    Handles SAR annotations
    • Constructor Detail

      • SARAnnotationSupport

        public SARAnnotationSupport()
    • 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.
      • 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 - 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.
      • 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