Class Annotation

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String annId
      Id of the annotation
      protected com.saperion.hyrcs.models.DocDimension docDimension
      Dimension of the document.
      protected boolean editMode
      To check whether the document is opened in edit mode or not
      protected boolean fillable
      Toggle to show fill color
      protected java.lang.String fillColor
      Fill color of the annotation
      protected boolean fixRotation
      Toggle to fix annotation rotation (Annotation does not rotate with the page it belongs to).
      protected double height
      Height of the annotation
      protected boolean movable
      Annotation is movable
      protected double opacity
      Opacity of the annotation
      protected java.lang.String pageNo
      Id of the content item the annotation belongs to
      protected boolean resizable
      Annotation is resizable
      protected Stroke stroke
      Stroke info of the annotation
      protected double width
      Width of the annotation
      protected double x
      X position of the annotation
      protected double y
      Y position of the annotation
    • Constructor Summary

      Constructors 
      Constructor Description
      Annotation()  
      Annotation​(com.saperion.hyrcs.models.DocDimension docDimension, boolean editMode)  
    • Field Detail

      • annId

        protected java.lang.String annId
        Id of the annotation
      • pageNo

        protected java.lang.String pageNo
        Id of the content item the annotation belongs to
      • x

        protected double x
        X position of the annotation
      • y

        protected double y
        Y position of the annotation
      • width

        protected double width
        Width of the annotation
      • height

        protected double height
        Height of the annotation
      • fillColor

        protected java.lang.String fillColor
        Fill color of the annotation
      • fillable

        protected boolean fillable
        Toggle to show fill color
      • fixRotation

        protected boolean fixRotation
        Toggle to fix annotation rotation (Annotation does not rotate with the page it belongs to).
      • resizable

        protected boolean resizable
        Annotation is resizable
      • movable

        protected boolean movable
        Annotation is movable
      • opacity

        protected double opacity
        Opacity of the annotation
      • stroke

        protected Stroke stroke
        Stroke info of the annotation
      • docDimension

        protected com.saperion.hyrcs.models.DocDimension docDimension
        Dimension of the document. It will not be serialized.
      • editMode

        protected boolean editMode
        To check whether the document is opened in edit mode or not
    • Constructor Detail

      • Annotation

        public Annotation()
      • Annotation

        public Annotation​(com.saperion.hyrcs.models.DocDimension docDimension,
                          boolean editMode)
    • Method Detail

      • getAnnId

        public java.lang.String getAnnId()
      • setAnnId

        public void setAnnId​(java.lang.String annId)
      • getPageNo

        public java.lang.String getPageNo()
      • setPageNo

        public void setPageNo​(java.lang.String pageNo)
      • getX

        public double getX()
      • getY

        public double getY()
      • getWidth

        public double getWidth()
      • getHeight

        public double getHeight()
      • getFillColor

        public java.lang.String getFillColor()
      • isFillable

        public boolean isFillable()
      • isFixRotation

        public boolean isFixRotation()
      • isResizable

        public boolean isResizable()
      • isMovable

        public boolean isMovable()
      • getOpacity

        public double getOpacity()
      • getStroke

        public Stroke getStroke()
      • normalizeX

        protected double normalizeX​(int x)
        The CoreServer delivers all coordinates for a normalized document sized 10000px x 10000px. So we have to calculate the real coordinates here.
      • normalizeY

        protected double normalizeY​(int y)
      • draw

        public abstract void draw​(Section section)
        This is an abstract method for filling up the annotation configuration by different types of annotations subclasses
        Parameters:
        section - contains information about an annotation (e.g. - annotation type and key value pairs)