Class Annotation

    • Field Detail

      • createdBy

        protected String createdBy
      • lastModifiedBy

        protected String lastModifiedBy
      • createdAt

        protected Date createdAt
      • lastModifiedAt

        protected Date lastModifiedAt
      • isModified

        protected boolean isModified
      • id

        protected String id
        anno id
      • doFireAnnotationEvents

        protected boolean doFireAnnotationEvents
        Flag whether annotation events should be fired. As default this flag is set to false until this annotation instance is initialized and the creation process is finished.
    • Constructor Detail

      • Annotation

        public Annotation()
    • Method Detail

      • translate

        public abstract void translate​(double dx,
                                       double dy)
        Translates this Annotation the indicated distance, to the right along the x coordinate axis, and downward along the y coordinate axis.
        dx - the distance to move this Rectangle along the x axis
        dy - the distance to move this Rectangle along the y axis
      • setSize

        public abstract void setSize​(double width,
                                     double height)
        Set the size of the annotation to the given size. Depending on the type of annotation, this may not be possible. E.g. stamp annotations handle the sizing on their own, so they will refuse to resize themselves. An IllegalArgumentExceptionis thrown in this case. Caveat: it is currently necessary, to force a repaint on the viewer in order to make the results of the modification visible. Moreover there are no modification events fired on the page and document. This will change in the future.
        width -
        height -
      • setLocation

        public abstract void setLocation​(double x,
                                         double y)
        Set the location (upper-left corner) of the annotation to the given point. Caveat: it is currently necessary, to force a repaint on the viewer in order to make the results of the modification visible. Moreover there are no modification events fired on the page and document. This will change in the future.
        x - X-position
        y - Y-position
      • getBounds

        public abstract Rectangle2D getBounds()
        Returns a Rectangle2D that completely encloses the annotation.
        Rectangle2D annotation bounding box
      • fireAnnotationChange

        protected void fireAnnotationChange​(Annotation previousState,
                                            com.levigo.jadice.web.shared.model.annotation.internal.AnnotationPageSegmentEvent.EventType eventType,
                                            Object oldValue,
                                            Object newValue)
        Handle an annotation change
      • setID

        public void setID​(String id)
        Set annotation id.
        id - Id to set.
      • getID

        public String getID()
        Returns annotations id.
        Annotation id
      • setProfileId

        public void setProfileId​(String profileId)
        Specified by:
        setProfileId in interface com.levigo.jadice.web.shared.model.annotation.internal.JwtAnnotation
      • getProfileId

        public String getProfileId()
        Specified by:
        getProfileId in interface com.levigo.jadice.web.shared.model.annotation.internal.JwtAnnotation
      • getTypeName

        public String getTypeName()
        Specified by:
        getTypeName in interface com.levigo.jadice.web.shared.model.annotation.internal.JwtAnnotation
      • setTypeName

        public void setTypeName​(String typeName)
        Specified by:
        setTypeName in interface com.levigo.jadice.web.shared.model.annotation.internal.JwtAnnotation
      • setModified

        public void setModified()
        Sets modified-flag.
      • clearModified

        public void clearModified()
        Clears the modified-flag.
      • isModified

        public boolean isModified()
        Returns modify status of the annotation.
        Modify status.
      • copyAttributesTo

        protected void copyAttributesTo​(Annotation annotation)
      • isDoFireAnnotationEvents

        public boolean isDoFireAnnotationEvents()
        Return whether this annotation instance propagates annotation events
        true if this annotation propagates its internal changes as annotation event, otherwise false will be returned
      • setDoFireAnnotationEvents

        public void setDoFireAnnotationEvents​(boolean doFireAnnotationEvents)
        Changes the annotation event propagation mode.
        doFireAnnotationEvents - true if this annotation should propagate its internal changes as annotation event, otherwise false should be set.
      • getProperties

        public Map<String,​Object> getProperties()
        Description copied from interface: PropertiesProvider
        Return a map of user properties. What to store and which keys to use is largely up to the user of classes implementing this interface, since those classes will generally be oblivious to the map's contents. There are no guarantees regarding the thread-safety of the returned map, unless otherwise specified by implementors.
        Specified by:
        getProperties in interface PropertiesProvider
        the map of user properties
      • isInitialized

        public boolean isInitialized()
      • initialize

        public void initialize​(Page page)
      • getCreatedBy

        public String getCreatedBy()
      • setCreatedBy

        public void setCreatedBy​(String originatorName)
      • getLastModifiedBy

        public String getLastModifiedBy()
      • setLastModifiedBy

        public void setLastModifiedBy​(String userName)
      • getCreatedAt

        public Date getCreatedAt()
      • setCreationTimestamp

        public void setCreationTimestamp​(Date creationTimestamp)
      • getLastModifiedAt

        public Date getLastModifiedAt()
      • setModifyTimestamp

        public void setModifyTimestamp​(Date modifyTimestamp)
      • getModCount

        public int getModCount()
      • getType

        public AnnotationType getType()
        Get the type profile.
        the typeProfile
      • setChangeHandler

        public void setChangeHandler​(com.levigo.jadice.web.shared.model.annotation.internal.AnnotationChangeHandler changeHandler)
        Changes the annotation change handler.
        Specified by:
        setChangeHandler in interface com.levigo.jadice.web.shared.model.annotation.internal.JwtAnnotation
        changeHandler -
      • getChangeHandler

        public com.levigo.jadice.web.shared.model.annotation.internal.AnnotationChangeHandler getChangeHandler()
        Returns the annotation change handler
        Specified by:
        getChangeHandler in interface com.levigo.jadice.web.shared.model.annotation.internal.JwtAnnotation
      • createMemento

        public org.jadice.util.base.Memento createMemento()