Class Annotations
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclearModified(Document document) Clear the modified state of allAnnotations on theDocument.static voidclearModified(Page page) Clear the modified state of allAnnotations on thePage.static RectanglegetAnnotationBoundsInPixel(PageView pageView, Annotation annotation, Page page) Returns the Bounds of the givenAnnotationin Pixel.static List<AnnotationCustomizer> AListof all registeredannotation customizers.static com.levigo.jadice.web.shared.model.annotation.internal.AnnotationPageSegmentgetAnnotationPageSegment(Page page, String profileId) Returns theAnnotationPageSegmentfor passed page.static Collection<Annotation> getAnnotations(Document document) Retrieves the list of annotations in the whole givenDocument.static Collection<Annotation> getAnnotations(Page page) Retrieves the list of annotations lying in thePageSegmentcorresponding to the givenPage.static Collection<Annotation> getAnnotations(Page page, DocumentLayer documentLayer) Retrieves the list of annotations lying in the correspondingPageSegmentfor a givenPageandDocumentLayer.static Collection<Annotation> getDeletedAnnotations(Document document) To a givenDocumentretrieve the list of annotations that have been deleted from the initial set of annotations which was sent from the server to the clientstatic Collection<Annotation> getDeletedAnnotations(Page page) To a givenPageretrieve the list of annotations that have been deleted from the initial set of annotations which was sent from the server to the clientstatic Collection<Annotation> getDeletedAnnotations(Page page, DocumentLayer documentLayer) To a givenPageandDocumentLayerretrieve the list of annotations that have been deleted from the initial set of annotations which was sent from the server to the clientstatic RectanglegetRelativeAnnotationBoundsInPixel(PageView pageView, Annotation annotation, Page page) Returns the Bounds of the givenAnnotationin Pixel.static RectanglegetRelativeAnnotationBoundsInPixel(PageView pageView, Annotation annotation, com.levigo.jadice.web.shared.model.annotation.internal.AnnotationPageSegment pageSegment) Deprecated.booleanisAnnotationPageSegment(Page page, DocumentLayer documentLayer) booleanisAnnotationPageSegment(PageSegment pageSegment) Check if the givenPageSegmentis anAnnotationPageSegmentstatic booleanisModified(Document document) Checks whether the annotations on the given document were modified after loading it from the server.static booleanisModified(Page page) Checks whether the annotations on the given page were modified after loading it from the server.
-
Constructor Details
-
Annotations
public Annotations()
-
-
Method Details
-
getAnnotationCustomizers
AListof all registeredannotation customizers.This
Listis intentionally writable to allow the registration and deregistration of customAnnotationCustomizerimplementations.The registered
annotation customizerswill all be executed duringannotationcreation by theAnnotationTool. Execution of the registeredannotation customizerswill be in insertion order of theList.AnnotationCustomizerimplementations shall be aware that they might encounter differentAnnotationtypes as all customizers will be executed regardless of the actualAnnotationtype.- Returns:
- the
AnnotationCustomizerobjects
-
getDeletedAnnotations
To a givenPageretrieve the list of annotations that have been deleted from the initial set of annotations which was sent from the server to the client- Parameters:
page- thePagecontaining possibly deletedAnnotationobjects- Returns:
- the list of deleted
Annotationobjects
-
getDeletedAnnotations
To a givenPageandDocumentLayerretrieve the list of annotations that have been deleted from the initial set of annotations which was sent from the server to the client- Parameters:
page- thePagecontaining possibly deletedAnnotationobjectsdocumentLayer- theDocumentLayerdefining thePageSegmentwhere theAnnotationobjects lie in- Returns:
- the list of deleted
Annotationobjects
-
getDeletedAnnotations
To a givenDocumentretrieve the list of annotations that have been deleted from the initial set of annotations which was sent from the server to the client- Parameters:
document- theDocumentcontaining possibly deletedAnnotationobjects- Returns:
- the list of deleted
Annotationobjects
-
getAnnotations
Retrieves the list of annotations lying in thePageSegmentcorresponding to the givenPage.- Parameters:
page- thePagecontaining possibly deletedAnnotationobjects- Returns:
- the list of
Annotationobjects
-
getAnnotations
Retrieves the list of annotations in the whole givenDocument.- Parameters:
document- theDocumentcontainingAnnotationobjects.- Returns:
- the list of
Annotationobjects in theDocument.
-
getAnnotations
Retrieves the list of annotations lying in the correspondingPageSegmentfor a givenPageandDocumentLayer.- Parameters:
page- thePagecontainingAnnotationobjectsdocumentLayer- theDocumentLayerdefining thePageSegmentwhere theAnnotationobjects lie in- Returns:
- the list of
Annotationobjects
-
isModified
Checks whether the annotations on the given page were modified after loading it from the server.Only modifications regarding annotations are tracked - like adding, deleting or changing annotations. Modifications referring to the base document (rotation, zoom, ...) do not qualify for a modification.
- Parameters:
page- APagethat may containAnnotationobjects- Returns:
- true if any of the page's annotations was modified after loading it from the server
-
isModified
Checks whether the annotations on the given document were modified after loading it from the server.Only modifications regarding annotations are tracked - like adding, deleting or changing annotations. Modifications referring to the base document (rotation, zoom, ...) do not qualify for a modification.
- Parameters:
document- ADocumentthat may containAnnotations on itsPages- Returns:
- true if any of the document's annotations was modified after loading it from the server
-
clearModified
Clear the modified state of allAnnotations on theDocument.- Parameters:
document- aDocumentwhich may containsAnnotations.
-
clearModified
Clear the modified state of allAnnotations on thePage.- Parameters:
page- aPagewhich may containsAnnotations.
-
isAnnotationPageSegment
- Parameters:
page- thePagecontaining thePageSegmentdocumentLayer- theDocumentLayercontaining thePageSegmentin question- Returns:
- true if the
PageSegmentis anAnnotationPageSegment; else false
-
isAnnotationPageSegment
Check if the givenPageSegmentis anAnnotationPageSegment- Parameters:
pageSegment- thePageSegmentto be checked- Returns:
- true if the
PageSegmentis anAnnotationPageSegment; else false
-
getRelativeAnnotationBoundsInPixel
public static Rectangle getRelativeAnnotationBoundsInPixel(PageView pageView, Annotation annotation, Page page) Returns the Bounds of the givenAnnotationin Pixel. The Bounds are relative to the viewer unlikeAnnotation.getBounds()which are relative to the Page containing the Annotation and given in jadice document units. -
getAnnotationBoundsInPixel
public static Rectangle getAnnotationBoundsInPixel(PageView pageView, Annotation annotation, Page page) Returns the Bounds of the givenAnnotationin Pixel. The Bounds are absolute inside of the viewer unlikeAnnotation.getBounds()which are relative to the Page containing the Annotation and given in jadice document units. -
getAnnotationPageSegment
public static com.levigo.jadice.web.shared.model.annotation.internal.AnnotationPageSegment getAnnotationPageSegment(Page page, String profileId) Returns theAnnotationPageSegmentfor passed page. If noAnnotationPageSegmentexists, a newAnnotationPageSegmentis created and added to the page.- Parameters:
page- The page where the page segment resides inprofileId- The id of the usedAnnotationProfile- Returns:
- Either the found
AnnotationPageSegmentor the newly created.
-