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, shape
Fields inherited from class com.levigo.jadice.annotation.ShapeBasedAnnotation
allowResize, fillColor, filled, iconified, linePainted, lineWidth, strokeColor, strokeResolution
Fields 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 void
copyAttributesTo
(Annotation annotation) Obtains the identifier of the image, such that an AnnotationImageProvider can find it.void
setImageID
(String imageID) The identifier of the image, such that an AnnotationImageProvider can find it.void
setSize
(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, update
Methods inherited from class com.levigo.jadice.annotation.ShapeBasedAnnotation
getFillColor, getLineWidth, getStrokeColor, getStrokeResolution, isAllowResize, isFilled, isIconified, isLinePainted, prepareSerialisation, setAllowResize, setFillColor, setFilled, setIconified, setLinePainted, setLineWidth, setStrokeColor, setStrokeResolution
Methods 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:Annotation
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. AnIllegalArgumentException
is 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:
setSize
in classRectangleAnnotation
- Parameters:
width
-height
-
-
copy
- Specified by:
copy
in interfacecom.levigo.jadice.web.shared.model.annotation.internal.JwtAnnotation
- Overrides:
copy
in classRectangleAnnotation
-
clone
- Overrides:
clone
in classAnnotation
-
copyAttributesTo
- Overrides:
copyAttributesTo
in classRectangleAnnotation
-