public class Caret extends Markup
Caret
represents the PDF caret annotation.
It offers specific properties get/set method for PDF caret annotation.
Before call all methods in this class,
please note to call
at first.PDFPage.loadAnnots()
Annot.Border, Annot.QuadpointsF
INTENTNAME_FREETEXT_CALLOUT, INTENTNAME_FREETEXT_TYPEWRITER, INTENTNAME_LINE_ARROW, INTENTNAME_LINE_DIMENSION, INTENTNAME_POLYGON_CLOUD, INTENTNAME_POLYGON_DIMENSION, INTENTNAME_POLYLINE_DIMENSION, LINEENDINGSTYLE_BUTT, LINEENDINGSTYLE_CIRCLE, LINEENDINGSTYLE_CLOSEDARROW, LINEENDINGSTYLE_DIAMOND, LINEENDINGSTYLE_NONE, LINEENDINGSTYLE_OPENARROW, LINEENDINGSTYLE_REVERSECLOSEDARROW, LINEENDINGSTYLE_REVERSEOPENARROW, LINEENDINGSTYLE_SLASH, LINEENDINGSTYLE_SQUARE, STATE_MARKED_MARKED, STATE_MARKED_UNMARKED, STATE_REVIEW_ACCEPTED, STATE_REVIEW_CANCELLED, STATE_REVIEW_COMPLETED, STATE_REVIEW_NONE, STATE_REVIEW_REJECTED, STATEMODEL_MARKED, STATEMODEL_REVIEW
BORDERSTYLE_BEVELED, BORDERSTYLE_CLOUDY, BORDERSTYLE_DASHED, BORDERSTYLE_INSET, BORDERSTYLE_SOLID, BORDERSTYLE_UNDERLINE, FLAG_HIDDEN, FLAG_INVISIBLE, FLAG_LOCKED, FLAG_LOCKEDCONTENTS, FLAG_NOROTATE, FLAG_NOVIEW, FLAG_NOZOOM, FLAG_PRINT, FLAG_READONLY, FLAG_TOGGLENOVIEW, HIGHLIGHTINGMODE_INVERT, HIGHLIGHTINGMODE_NONE, HIGHLIGHTINGMODE_OUTLINE, HIGHLIGHTINGMODE_PUSH, HIGHLIGHTINGMODE_TOGGLE, MKENTRY_BACKGROUNDCOLOR, MKENTRY_BORDERCOLOR, MKENTRY_DOWNCAPTION, MKENTRY_DOWNICON, MKENTRY_ICONFIT, MKENTRY_NORMALCAPTION, MKENTRY_NORMALICON, MKENTRY_ROLLOVERCAPTION, MKENTRY_ROLLOVERICON, MKENTRY_ROTATION, MKENTRY_TEXTPOSITION, TRIGGER_ANNOT_CE, TRIGGER_ANNOT_CX, TRIGGER_ANNOT_FL, TRIGGER_ANNOT_FO, TRIGGER_ANNOT_MD, TRIGGER_ANNOT_MU, TRIGGER_ANNOT_PC, TRIGGER_ANNOT_PI, TRIGGER_ANNOT_PO, TRIGGER_ANNOT_PV, TYPE_3D, TYPE_CARET, TYPE_CIRCLE, TYPE_FILEATTACHMENT, TYPE_FREETEXT, TYPE_HIGHLIGHT, TYPE_INK, TYPE_LINE, TYPE_LINK, TYPE_MOVIE, TYPE_POLYGON, TYPE_POLYLINE, TYPE_POPUP, TYPE_PRINTERMARK, TYPE_PSI, TYPE_SCREEN, TYPE_SOUND, TYPE_SQUARE, TYPE_SQUIGGLY, TYPE_STAMP, TYPE_STRIKEOUT, TYPE_TEXT, TYPE_TRAPNET, TYPE_UNDERLINE, TYPE_WATERMARK, TYPE_WIDGET
Modifier and Type | Method and Description |
---|---|
float[] |
getInnerRectMargin()
Get the margin between inner rectangle and rectangle of current caret
annotation.
|
java.lang.String |
getSymbol()
Get symbol of current caret annotation.
|
void |
resetAppearance()
Reset(regenerate) appearance of current caret annotation.
|
void |
setInnerRectMargin(float[] values)
Set the margin between inner rectangle and rectangle of current caret
annotation.
|
void |
setSymbol(java.lang.String symbol)
Set symbol of current caret annotation.
|
addState, countReplies, countStateAnnots, getCreationDateTime, getGroupElements, getGroupHeader, getIntent, getOpacity, getReply, getState, getStateAnnot, getSubject, getTitle, insertReply, isGrouped, isTextMarkup, removeAllReplies, removeAllStates, removeReply, setCreationDateTime, setGroup, setIntent, setOpacity, setState, setSubject, setTitle, unGroup
getBorder, getBorderColor, getContents, getDeviceRect, getFlags, getHandle, getIndex, getModifiedDateTime, getName, getRect, getType, isMarkup, move, setBorder, setBorderColor, setContents, setFlags, setIconProvider, setModifiedDateTime, setName
public float[] getInnerRectMargin() throws PDFException
For caret annotation, inner rectangle means the actual boundaries. Usually, the sum of top and bottom margin values should be less than the height of annotation's rectangle, and the sum of left and right margin values should be less than the width of annotation's rectangle.
null
.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException
public java.lang.String getSymbol() throws PDFException
A symbol is associated with caret. Valid values are:
String
object that receives value of symbol
property.null
.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException
public void setSymbol(java.lang.String symbol) throws PDFException
Currently application should ensure this property has been set valid to newly added caret annotation.
symbol
- A String
object that specifies value of symbol
property. A symbol is associated with the caret. Valid values
are:PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException
public void setInnerRectMargin(float[] values) throws PDFException
For caret annotation, inner rectangle means the actual boundaries. When setting inner rectangle margin, application should ensure that: the sum of top and bottom margin values should be less than the height of annotation's rectangle, and the sum of left and right margin values should be less than the width of annotation's rectangle.
values
- A float array with 4 elements to specify the new margin
values. The 4 elements should represent "left", "top", "right"
and "bottom" values in turn.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException
public void resetAppearance() throws PDFException
PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException