public class Link extends Annot
Annot.BorderStyle
Modifier and Type | Field and Description |
---|---|
static int |
e_invert
The Constant e_invert.
|
static int |
e_none
This integer list spedifies the Highlighting mode of the Link Annotation
e_none - No highlighting.
|
static int |
e_outline
The Constant e_outline.
|
static int |
e_push
The Constant e_push.
|
e_3D, e_action_trigger_activate, e_action_trigger_annot_blur, e_action_trigger_annot_down, e_action_trigger_annot_enter, e_action_trigger_annot_exit, e_action_trigger_annot_focus, e_action_trigger_annot_page_close, e_action_trigger_annot_page_invisible, e_action_trigger_annot_page_open, e_action_trigger_annot_page_visible, e_action_trigger_annot_up, e_Caret, e_Circle, e_down, e_FileAttachment, e_FreeText, e_hidden, e_Highlight, e_Ink, e_invisible, e_Line, e_Link, e_locked, e_locked_contents, e_Movie, e_no_rotate, e_no_view, e_no_zoom, e_normal, e_Polygon, e_Polyline, e_Popup, e_print, e_PrinterMark, e_Projection, e_read_only, e_Redact, e_RichMedia, e_rollover, e_Screen, e_Sound, e_Square, e_Squiggly, e_Stamp, e_StrikeOut, e_Text, e_toggle_no_view, e_TrapNet, e_Underline, e_Unknown, e_Watermark, e_Widget
Constructor and Description |
---|
Link()
Creates an empty Link annotation and initialize it using given Cos/SDF object.
|
Link(Annot annot)
Creates a Link annotation and initialize it using given annotation object.
|
Link(long impl,
java.lang.Object ref)
Instantiates a new link.
|
Link(Obj d)
Creates a Link annotation and initialize it using given Cos/SDF object.
|
Modifier and Type | Method and Description |
---|---|
static Link |
create(Doc doc,
Rect pos)
Creates a new Link annotation.
|
static Link |
create(Doc doc,
Rect pos,
Action action)
Creates a new Link annotation.
|
Action |
getAction()
Get the Action of the Linked Annotation.
|
int |
getHighlightingMode()
Get the HighlightingMode Linked Annotation.
|
QuadPoint |
getQuadPoint(int idx)
Get the QuadPoint located at a certain index of the QuadPoint array of the Link
annotation.
|
int |
getQuadPointCount()
Get the number of QuadPoints in the QuadPoints array of the Link annotation.
|
void |
removeAction()
Removes a link annotation's action.
|
void |
setAction(Action action)
Set the Action of the Linked Annotation.
|
void |
setHighlightingMode(int mode)
Set the HighlightingMode Linked Annotation.
|
void |
setQuadPoint(int idx,
QuadPoint qp)
Set the QuadPoint to be located at a certain index of the QuadPoint array of the Link
annotation.
|
__Create, __GetHandle, __GetRefHandle, create, equals, flatten, getActiveAppearanceState, getAppearance, getAppearance, getAppearance, getBorderStyle, getColorAsCMYK, getColorAsGray, getColorAsRGB, getColorCompNum, getContents, getDate, getFlag, getOptionalContent, getPage, getRect, getRotation, getSDFObj, GetStructParent, getTriggerAction, getType, getUniqueID, getVisibleContentBox, isMarkup, isValid, refreshAppearance, removeAppearance, resize, setActiveAppearanceState, setAppearance, setAppearance, setAppearance, setBorderStyle, setColor, setContents, setDate, setFlag, setOptionalContent, setPage, setRect, setRotation, setStructParent, setUniqueID
public static final int e_none
public static final int e_invert
public static final int e_outline
public static final int e_push
public Link(Obj d)
Note: The constructor does not copy any data, but is instead the logical equivalent of a type cast.
d
- the input Cos/SDF objectpublic Link()
Note: The constructor does not copy any data, but is instead the logical equivalent of a type cast.
public Link(long impl, java.lang.Object ref)
impl
- the implref
- the refpublic Link(Annot annot) throws PDFNetException
Note: The constructor does not copy any data, but is instead the logical equivalent of a type cast.
annot
- the input annoation objectPDFNetException
public static Link create(Doc doc, Rect pos) throws PDFNetException
doc
- A document to which the annotation is added.pos
- A rectangle specifying the annotation's bounds, specified in
user space coordinates.PDFNetException
public static Link create(Doc doc, Rect pos, Action action) throws PDFNetException
doc
- A document to which the annotation is added.pos
- A rectangle specifying the annotation's bounds, specified in
user space coordinates.action
- Action for the link annotation.PDFNetException
public void removeAction() throws PDFNetException
PDFNetException
public Action getAction() throws PDFNetException
Note: The return value is an action that shall be performed when the link annotation is activated
PDFNetException
public void setAction(Action action) throws PDFNetException
Note: The parameter is an action that shall be performed when the link annotation is activated
action
- An Action object that denotes the action of the linked annotation.PDFNetException
public int getHighlightingMode() throws PDFNetException
Note: The annotation's highlighting mode is the visual effect that shall be used when the mouse button is pressed or held down inside its active area, possible values as follows: e_none - No highlighting. e_invert - Invert the contents of the annotation rectangle. e_outline - Invert the annotation's border e_push - Display the annotation as if it were being pushed below the surface of the page. Default value: e_invert.
PDFNetException
public void setHighlightingMode(int mode) throws PDFNetException
Note: The annotation's highlighting mode is the visual effect that shall be used when the mouse button is pressed or held down inside its active area, possible values as follows: e_none - No highlighting. e_invert - Invert the contents of the annotation rectangle. e_outline - Invert the annotation's border e_push - Display the annotation as if it were being pushed below the surface of the page. Default value: e_invert.
mode
- The HighLighting mode represented as an entry of the enum "HighlightingMode".PDFNetException
public int getQuadPointCount() throws PDFNetException
Note: An array of n QuadPoints specifying the coordinates of n quadrilaterals in default user space that comprise the region in which the link should be activated. The coordinates specifying the four vertices of the quadrilateral in counterclockwise order. For orientation purposes, such as when applying an underline border style, the bottom of a quadrilateral is the line formed by p1 and p2 of the QuadPoint. QuadPoints shall be ignored if any coordinate in the array lies outside the region specified by Rect.
PDFNetException
public QuadPoint getQuadPoint(int idx) throws PDFNetException
Note: An array of n QuadPoints specifying the coordinates of n quadrilaterals in default user space that comprise the region in which the link should be activated. The coordinates specifying the four vertices of the quadrilateral in counterclockwise order. For orientation purposes, such as when applying an underline border style, the bottom of a quadrilateral is the line formed by p1 and p2 of the QuadPoint. QuadPoints shall be ignored if any coordinate in the array lies outside the region specified by Rect.
idx
- the idxPDFNetException
public void setQuadPoint(int idx, QuadPoint qp) throws PDFNetException
Note: An array of n QuadPoints specifying the coordinates of n quadrilaterals in default user space that comprise the region in which the link should be activated. The coordinates specifying the four vertices of the quadrilateral in counterclockwise order. For orientation purposes, such as when applying an underline border style, the bottom of a quadrilateral is the line formed by p1 and p2 of the QuadPoint. QuadPoints shall be ignored if any coordinate in the array lies outside the region specified by Rect.
idx
- the index of the QuadPoint arrayqp
- the QuadPointPDFNetException