Class Annotation
- java.lang.Object
-
- com.saperion.ngc.viewer.hylandviewer.annotation.json.Annotation
-
- Direct Known Subclasses:
LineAnnotation,RectangleAnnotation,TextAnnotation
public abstract class Annotation extends java.lang.ObjectContains configuration of annotation- Author:
- schowdhury
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringannIdId of the annotationprotected com.saperion.hyrcs.models.DocDimensiondocDimensionDimension of the document.protected booleaneditModeTo check whether the document is opened in edit mode or notprotected booleanfillableToggle to show fill colorprotected java.lang.StringfillColorFill color of the annotationprotected booleanfixRotationToggle to fix annotation rotation (Annotation does not rotate with the page it belongs to).protected doubleheightHeight of the annotationprotected booleanmovableAnnotation is movableprotected doubleopacityOpacity of the annotationprotected java.lang.StringpageNoId of the content item the annotation belongs toprotected booleanresizableAnnotation is resizableprotected StrokestrokeStroke info of the annotationprotected doublewidthWidth of the annotationprotected doublexX position of the annotationprotected doubleyY position of the annotation
-
Constructor Summary
Constructors Constructor Description Annotation()Annotation(com.saperion.hyrcs.models.DocDimension docDimension, boolean editMode)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voiddraw(Section section)This is an abstract method for filling up the annotation configuration by different types of annotations subclassesjava.lang.StringgetAnnId()java.lang.StringgetFillColor()doublegetHeight()doublegetOpacity()java.lang.StringgetPageNo()StrokegetStroke()abstract AnnotationTypegetType()doublegetWidth()doublegetX()doublegetY()booleanisFillable()booleanisFixRotation()booleanisMovable()booleanisResizable()protected doublenormalizeX(int x)The CoreServer delivers all coordinates for a normalized document sized 10000px x 10000px.protected doublenormalizeY(int y)voidsetAnnId(java.lang.String annId)voidsetPageNo(java.lang.String pageNo)
-
-
-
Field Detail
-
annId
protected java.lang.String annId
Id of the annotation
-
pageNo
protected java.lang.String pageNo
Id of the content item the annotation belongs to
-
x
protected double x
X position of the annotation
-
y
protected double y
Y position of the annotation
-
width
protected double width
Width of the annotation
-
height
protected double height
Height of the annotation
-
fillColor
protected java.lang.String fillColor
Fill color of the annotation
-
fillable
protected boolean fillable
Toggle to show fill color
-
fixRotation
protected boolean fixRotation
Toggle to fix annotation rotation (Annotation does not rotate with the page it belongs to).
-
resizable
protected boolean resizable
Annotation is resizable
-
movable
protected boolean movable
Annotation is movable
-
opacity
protected double opacity
Opacity of the annotation
-
stroke
protected Stroke stroke
Stroke info of the annotation
-
docDimension
protected com.saperion.hyrcs.models.DocDimension docDimension
Dimension of the document. It will not be serialized.
-
editMode
protected boolean editMode
To check whether the document is opened in edit mode or not
-
-
Method Detail
-
getAnnId
public java.lang.String getAnnId()
-
setAnnId
public void setAnnId(java.lang.String annId)
-
getPageNo
public java.lang.String getPageNo()
-
setPageNo
public void setPageNo(java.lang.String pageNo)
-
getX
public double getX()
-
getY
public double getY()
-
getWidth
public double getWidth()
-
getHeight
public double getHeight()
-
getFillColor
public java.lang.String getFillColor()
-
isFillable
public boolean isFillable()
-
isFixRotation
public boolean isFixRotation()
-
isResizable
public boolean isResizable()
-
isMovable
public boolean isMovable()
-
getOpacity
public double getOpacity()
-
getStroke
public Stroke 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
public abstract AnnotationType getType()
-
draw
public abstract void draw(Section section)
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)
-
-