Class AnnotationContainer

  • All Implemented Interfaces:
    java.io.Serializable

    public class AnnotationContainer
    extends java.lang.Object
    implements java.io.Serializable
    Class to serialize annotations into a file. Used by Annotator and LayoutComparator.
    See Also:
    Serialized Form
    • Constructor Detail

      • AnnotationContainer

        public AnnotationContainer​(java.awt.Color annotationColor,
                                   java.util.List<java.awt.Rectangle> annotations)
        Default constructor.
        Parameters:
        annotationColor - Color for annotations.
        annotations - List of annotations.
    • Method Detail

      • getAnnotationColor

        public java.awt.Color getAnnotationColor()
      • getBaseImagePath

        public java.lang.String getBaseImagePath()
      • getSaveObjectPath

        public java.lang.String getSaveObjectPath()
      • getAnnotations

        public java.util.List<java.awt.Rectangle> getAnnotations()
      • setAnnotationColor

        public void setAnnotationColor​(java.awt.Color annotationColor)
      • setAnnotations

        public void setAnnotations​(java.util.List<java.awt.Rectangle> annotations)
      • toJson

        public void toJson​(java.io.File jsonFile)
                    throws java.io.IOException
        Write this Object to a json File.
        Parameters:
        jsonFile - File to write detials into.
        Throws:
        java.io.IOException - Exception handling file.
      • readFromJson

        public static AnnotationContainer readFromJson​(java.io.File jsonFile)
                                                throws java.io.IOException
        Deserialize AnnotationContainer from json file.
        Parameters:
        jsonFile - File to read.
        Returns:
        AnnotationContainer
        Throws:
        java.io.IOException - Exception handling File.