com.qoppa.pdf.annotations
Interface TextMarkup

All Superinterfaces:
Annotation, MarkUpText

public interface TextMarkup
extends MarkUpText

Interface representing a Text Markup annotation in a PDF document. Text markup annotations are a way to mark text in a document by highlighting, crossing out, or underlining.

Author:
Qoppa Software

Field Summary
static int TYPE_HIGHLIGHT
           
static int TYPE_INSERT
           
static int TYPE_REPLACEMENT
           
static int TYPE_SQUIGGLY
           
static int TYPE_STRIKEOUT
           
static int TYPE_UNDERLINE
           
 
Fields inherited from interface com.qoppa.pdf.annotations.Annotation
BORDERSTYLE_BEVELED, BORDERSTYLE_DASHED, BORDERSTYLE_INSETS, BORDERSTYLE_SOLID, BORDERSTYLE_UNDERLINE, FLAGS_HIDDEN, FLAGS_INVISIBLE, FLAGS_LOCKED, FLAGS_NOROTATE, FLAGS_NOVIEW, FLAGS_NOZOOM, FLAGS_PRINTABLE, FLAGS_READONLY
 
Method Summary
 String getIntent()
          returns intent for this annotation
 int getMarkupType()
          Gets the type of markup that this annotation represents.
 Vector getQuadList()
          Returns a list of the quadrilaterals that compose this annotation.
 String getText(IPDFPage page)
           
 void setContents(String contents)
          Sets the text content for this annotation.
 void setQuadList(Vector quadList)
          Sets the list of quadrilaterals that compose this annotation.
 void setRectangleFromQuads()
          Convenience method to set the annotation rectangle from the quadrilaterals.
 void setSubtype(String subtype)
          Sets the annotation's subtype.
 
Methods inherited from interface com.qoppa.pdf.annotations.Annotation
getActions, getBorderStyle, getBorderWidth, getColor, getComponent, getContents, getCreationDate, getCreator, getFlags, getModifiedDate, getName, getOpacity, getRectangle, getSubject, getSubtype, getTriggerActions, isHidden, isInvisible, isLocked, isNoRotate, isNoView, isNoZoom, isPrintable, isReadOnly, paint, paint, print, revalidate, setActions, setBorderStyle, setBorderWidth, setColor, setComponent, setComponentVisible, setCreationDate, setCreator, setFlags, setHidden, setInvisible, setLayer, setLocked, setModifiedDate, setName, setNoRotate, setNoView, setNoZoom, setOpacity, setPrintable, setReadOnly, setRectangle, setSubject, setTriggerActions, shiftRectangle
 

Field Detail

TYPE_HIGHLIGHT

static final int TYPE_HIGHLIGHT
See Also:
Constant Field Values

TYPE_UNDERLINE

static final int TYPE_UNDERLINE
See Also:
Constant Field Values

TYPE_SQUIGGLY

static final int TYPE_SQUIGGLY
See Also:
Constant Field Values

TYPE_STRIKEOUT

static final int TYPE_STRIKEOUT
See Also:
Constant Field Values

TYPE_REPLACEMENT

static final int TYPE_REPLACEMENT
See Also:
Constant Field Values

TYPE_INSERT

static final int TYPE_INSERT
See Also:
Constant Field Values
Method Detail

getMarkupType

int getMarkupType()
Gets the type of markup that this annotation represents.

Specified by:
getMarkupType in interface MarkUpText
Returns:
One of the predefined constants: TYPE_HIGHLIGHT, TYPE_UNDERLINE, TYPE_SQUIGGLY, etc.

setContents

void setContents(String contents)
Sets the text content for this annotation. The content is the comment that a user can enter when creating the annotation.

Specified by:
setContents in interface MarkUpText
Parameters:
contents - the new comment.

getQuadList

Vector getQuadList()
Returns a list of the quadrilaterals that compose this annotation. Each item in the list is an array of 4 Point.Double objects that contains the 4 points needed for that quadrilateral.

Specified by:
getQuadList in interface MarkUpText
Returns:
List of quadrilaterals.

setQuadList

void setQuadList(Vector quadList)
Sets the list of quadrilaterals that compose this annotation. Each item in the list should be an array of 4 Point.Double objects.

Specified by:
setQuadList in interface MarkUpText
Parameters:
quadList - The new list of quadrilaterals.

setRectangleFromQuads

void setRectangleFromQuads()
Convenience method to set the annotation rectangle from the quadrilaterals.

Specified by:
setRectangleFromQuads in interface MarkUpText

getIntent

String getIntent()
returns intent for this annotation

Specified by:
getIntent in interface MarkUpText
Returns:
Returns the value of the Intent property.

getText

String getText(IPDFPage page)
               throws PDFPermissionException
Specified by:
getText in interface MarkUpText
Parameters:
page - The page the annotation is located on.
Returns:
The text corresponding to this annotation's quadrilaterals.
Throws:
PDFPermissionException

setSubtype

void setSubtype(String subtype)
Sets the annotation's subtype.

Specified by:
setSubtype in interface Annotation
Parameters:
subtype - The type of the markup annotation. Possible values are Highlight, Underline, StrikeOut, Squiggly.