Package com.levigo.jadice.annotation
Class JWTImageAnnotation
java.lang.Object
com.levigo.jadice.annotation.Annotation
com.levigo.jadice.annotation.ShapeBasedAnnotation
com.levigo.jadice.annotation.RectangleAnnotation
com.levigo.jadice.annotation.JWTImageAnnotation
- All Implemented Interfaces:
PermissionsProvider<Annotation>,PropertiesProvider,com.levigo.jadice.web.shared.model.annotation.internal.JwtAnnotation,Serializable,org.jadice.util.base.MementoOriginator
A sub type of a RectangleAnnotation whose content is an image.
The JWTImageAnnotation holds an imageID instead of an image. As the renderer renders the annotation it requests the image from the server by its ID and matching profile.
- See Also:
-
Field Summary
FieldsFields inherited from class com.levigo.jadice.annotation.RectangleAnnotation
rect, shapeFields inherited from class com.levigo.jadice.annotation.ShapeBasedAnnotation
allowResize, fillColor, filled, iconified, linePainted, lineWidth, strokeColor, strokeResolutionFields inherited from class com.levigo.jadice.annotation.Annotation
createdAt, createdBy, doFireAnnotationEvents, id, initializer, isModified, lastModifiedAt, lastModifiedBy -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()copy()protected voidcopyAttributesTo(Annotation annotation) Obtains the identifier of the image, such that an AnnotationImageProvider can find it.voidsetImageID(String imageID) The identifier of the image, such that an AnnotationImageProvider can find it.voidsetSize(double width, double height) Set the size of the annotation to the given size.Methods inherited from class com.levigo.jadice.annotation.RectangleAnnotation
getBounds, getRectangle, getShape, setLocation, setRectangle, translate, updateMethods inherited from class com.levigo.jadice.annotation.ShapeBasedAnnotation
getFillColor, getLineWidth, getStrokeColor, getStrokeResolution, isAllowResize, isFilled, isIconified, isLinePainted, prepareSerialisation, setAllowResize, setFillColor, setFilled, setIconified, setLinePainted, setLineWidth, setStrokeColor, setStrokeResolutionMethods inherited from class com.levigo.jadice.annotation.Annotation
clearModified, createMemento, fireAnnotationChange, getChangeHandler, getCreatedAt, getCreatedBy, getID, getInitializer, getLastModifiedAt, getLastModifiedBy, getModCount, getPermissions, getProfileId, getProperties, getType, getTypeName, initialize, isDoFireAnnotationEvents, isInitialized, isModified, restoreFrom, setChangeHandler, setCreatedBy, setCreationTimestamp, setDoFireAnnotationEvents, setID, setInitializer, setLastModifiedBy, setModified, setModifyTimestamp, setProfileId, setType, setTypeName
-
Field Details
-
imageID
-
-
Constructor Details
-
JWTImageAnnotation
public JWTImageAnnotation()
-
-
Method Details
-
getImageID
Obtains the identifier of the image, such that an AnnotationImageProvider can find it.- Returns:
- The image id.
-
setImageID
The identifier of the image, such that an AnnotationImageProvider can find it. -
setSize
public void setSize(double width, double height) Description copied from class:AnnotationSet 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. AnIllegalArgumentExceptionis 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.- Overrides:
setSizein classRectangleAnnotation- Parameters:
width-height-
-
copy
- Specified by:
copyin interfacecom.levigo.jadice.web.shared.model.annotation.internal.JwtAnnotation- Overrides:
copyin classRectangleAnnotation
-
clone
- Overrides:
clonein classAnnotation
-
copyAttributesTo
- Overrides:
copyAttributesToin classRectangleAnnotation
-