Class Annotation
java.lang.Object
com.saperion.ngc.viewer.hylandviewer.annotation.json.Annotation
- Direct Known Subclasses:
LineAnnotation
,RectangleAnnotation
,Redaction
,TextAnnotation
Contains configuration of annotation
- Author:
- schowdhury
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
Id of the annotationprotected com.saperion.hyrcs.models.DocDimension
Dimension of the document.protected boolean
To check whether the document is opened in edit mode or notprotected boolean
Toggle to show fill colorprotected String
Fill color of the annotationprotected boolean
Toggle to fix annotation rotation (Annotation does not rotate with the page it belongs to).protected double
Height of the annotationprotected boolean
Annotation is movableprotected double
Opacity of the annotationprotected String
Id of the content item the annotation belongs toprotected boolean
Annotation is resizableprotected Stroke
Stroke info of the annotationprotected double
Width of the annotationprotected double
X position of the annotationprotected double
Y position of the annotation -
Constructor Summary
ConstructorsConstructorDescriptionAnnotation
(com.saperion.hyrcs.models.DocDimension docDimension, boolean editMode) -
Method Summary
Modifier and TypeMethodDescriptionabstract void
This is an abstract method for filling up the annotation configuration by different types of annotations subclassesgetAnnId()
double
double
abstract AnnotationType
getType()
double
getWidth()
double
getX()
double
getY()
boolean
boolean
boolean
boolean
protected double
normalizeX
(int x) The CoreServer delivers all coordinates for a normalized document sized 10000px x 10000px.protected double
normalizeY
(int y) void
void
-
Field Details
-
annId
Id of the annotation -
pageNo
Id of the content item the annotation belongs to -
x
protected double xX position of the annotation -
y
protected double yY position of the annotation -
width
protected double widthWidth of the annotation -
height
protected double heightHeight of the annotation -
fillColor
Fill color of the annotation -
fillable
protected boolean fillableToggle to show fill color -
fixRotation
protected boolean fixRotationToggle to fix annotation rotation (Annotation does not rotate with the page it belongs to). -
resizable
protected boolean resizableAnnotation is resizable -
movable
protected boolean movableAnnotation is movable -
opacity
protected double opacityOpacity of the annotation -
stroke
Stroke info of the annotation -
docDimension
protected com.saperion.hyrcs.models.DocDimension docDimensionDimension of the document. It will not be serialized. -
editMode
protected boolean editModeTo check whether the document is opened in edit mode or not
-
-
Constructor Details
-
Annotation
public Annotation() -
Annotation
public Annotation(com.saperion.hyrcs.models.DocDimension docDimension, boolean editMode)
-
-
Method Details
-
getAnnId
-
setAnnId
-
getPageNo
-
setPageNo
-
getX
public double getX() -
getY
public double getY() -
getWidth
public double getWidth() -
getHeight
public double getHeight() -
getFillColor
-
isFillable
public boolean isFillable() -
isFixRotation
public boolean isFixRotation() -
isResizable
public boolean isResizable() -
isMovable
public boolean isMovable() -
getOpacity
public double getOpacity() -
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) -
getType
-
draw
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)
-