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.Object
Contains configuration of annotation- Author:
- schowdhury
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
annId
Id of the annotationprotected com.saperion.hyrcs.models.DocDimension
docDimension
Dimension of the document.protected boolean
editMode
To check whether the document is opened in edit mode or notprotected boolean
fillable
Toggle to show fill colorprotected java.lang.String
fillColor
Fill color of the annotationprotected boolean
fixRotation
Toggle to fix annotation rotation (Annotation does not rotate with the page it belongs to).protected double
height
Height of the annotationprotected boolean
movable
Annotation is movableprotected double
opacity
Opacity of the annotationprotected java.lang.String
pageNo
Id of the content item the annotation belongs toprotected boolean
resizable
Annotation is resizableprotected Stroke
stroke
Stroke info of the annotationprotected double
width
Width of the annotationprotected double
x
X position of the annotationprotected double
y
Y 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 void
draw(Section section)
This is an abstract method for filling up the annotation configuration by different types of annotations subclassesjava.lang.String
getAnnId()
java.lang.String
getFillColor()
double
getHeight()
double
getOpacity()
java.lang.String
getPageNo()
Stroke
getStroke()
abstract AnnotationType
getType()
double
getWidth()
double
getX()
double
getY()
boolean
isFillable()
boolean
isFixRotation()
boolean
isMovable()
boolean
isResizable()
protected double
normalizeX(int x)
The CoreServer delivers all coordinates for a normalized document sized 10000px x 10000px.protected double
normalizeY(int y)
void
setAnnId(java.lang.String annId)
void
setPageNo(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)
-
-