public class Screen extends Annot
Screen
represents the screen annotation.
It offers specific properties get/set method for screen annotation.
Before call all methods in this class,
please note to call
at first.PDFPage.loadAnnots()
Annot.Border, Annot.QuadpointsF
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 |
---|---|
long |
getMKColor(int mkEntry)
Get color of a specific type in MK dictionary.
|
int |
getMKRotation()
Get rotation (the number of degrees) in MK dictionary.
|
boolean |
hasMKEntry(int mkEntry)
Checks if specific entry is in MK dictionary.
|
boolean |
removeMKEntry(int mkEntry)
Remove a specified entry in MK dictionary.
|
void |
setMKColor(int mkEntry,
long color)
Set color of specific type in MK dictionary.
|
void |
setMKRotation(int degree)
Set rotation in MK dictionary.
|
getBorder, getBorderColor, getContents, getDeviceRect, getFlags, getHandle, getIndex, getModifiedDateTime, getName, getRect, getType, isMarkup, move, setBorder, setBorderColor, setContents, setFlags, setIconProvider, setModifiedDateTime, setName
public boolean hasMKEntry(int mkEntry) throws PDFException
MK entry can be used to provide an appearance characteristics dictionary containing additional information for constructing the annotation's appearance stream.
mkEntry
- An integer
value used to specify entry in MK
dictionary. Please refer to definitions
MKENTRY_XXX
and
it should be one of them.boolean
value which indicates if specific entry is
in MK dictionary.false
.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException
,
Annot
public boolean removeMKEntry(int mkEntry) throws PDFException
mkEntry
- An integer
value that specified an entry in MK
dictionary, which will be removed from MK dictionary. Please
refers to
MKENTRY_XXX
and
this should be one of them.true
if removed successfully, else return
false
for not found the specified MK dictionary.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException
,
Annot
public int getMKRotation() throws PDFException
integer
value that specifies the value of
rotation entry in MK dictionary.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException
public void setMKRotation(int degree) throws PDFException
degree
- An integer
value that specifies the new value of
rotation entry. The value must be a multiple of 90.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException
public long getMKColor(int mkEntry) throws PDFException
mkEntry
- An integer
to specify type of color entry in MK
dictionary. It should be one of the following:long
value that specifies the value of color of
specific type. Format: 0xAARRGGBB, and alpha value is ignored.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException
,
Annot
public void setMKColor(int mkEntry, long color) throws PDFException
mkEntry
- An integer
value to specify the type of color entry in
MK dictionary. It should be one of the following:color
- A long
value that specifies the value of new
color in specific type. Format: 0xAARRGGBB, and alpha value is ignored.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException