org.icepdf.core.pobjects.annotations
Class LinkAnnotation

java.lang.Object
  extended by org.icepdf.core.pobjects.Dictionary
      extended by org.icepdf.core.pobjects.annotations.Annotation
          extended by org.icepdf.core.pobjects.annotations.LinkAnnotation

public class LinkAnnotation
extends Annotation

Refer to: 8.4.5 Annotation Types

Key Type Value
Subtype name (Required) The type of annotation that this dictionary describes; must be Link for a link annotation.
Dest array, name, or string (Optional; not permitted if an A entry is present) A destination to be displayed when the annotation is activated (see Section 8.2.1, "Destinations"; see also implementation note 90 in Appendix H).
H name (Optional; PDF 1.2) The annotation's highlighting mode, the visual effect to be used when the mouse button is pressed or held down inside its active area:
N (None) No highlighting.
I (Invert) Invert the contents of the annotation rectangle.
O (Outline) Invert the annotation's border.
P (Push) Display the annotation as if it were being pushed below the surface of the page; see implementation note 91 in Appendix H.
Acrobat viewer displays the link appearance with bevel border, ignoring any down appearance.
Default value: I.
QuadPoints array (Optional; PDF 1.6) An array of 8 x n numbers specifying the coordinates of n quadrilaterals in default user space that comprise the region in which the link should be activated. The coordinates for each quadrilateral are given in the order
x1 y1 x2 y2 x3 y3 x4 y4
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 (x1, y1) and (x2, y2). If this entry is not present or the viewer application does not recognize it, the region specified by the Rect entry should be used. QuadPoints should be ignored if any coordinate in the array lies outside the region specified by Rect.

Since:
2.5
Author:
Mark Collette

Field Summary
static Name DESTINATION_KEY
          Key used to indcate highlight mode.
static java.lang.String HIGHLIGHT_INVERT
          Indicates that the annotation rectangle colours should be inverted for its highlight effect.
static Name HIGHLIGHT_MODE_KEY
          Key used to indcate highlight mode.
static java.lang.String HIGHLIGHT_NONE
          Indicates that the annotation has no highlight effect.
static java.lang.String HIGHLIGHT_OUTLINE
          Indicates that the annotation rectangle border should be inverted for its highlight effect.
static java.lang.String HIGHLIGHT_PUSH
          Indicates that the annotation rectangle border should be pushed below the surface of th page.
 
Fields inherited from class org.icepdf.core.pobjects.annotations.Annotation
ACTION_KEY, APPEARANCE_STATE_KEY, APPEARANCE_STREAM_DOWN_KEY, APPEARANCE_STREAM_KEY, APPEARANCE_STREAM_NORMAL_KEY, APPEARANCE_STREAM_ROLLOVER_KEY, border, BORDER_DASH, BORDER_HORIZONTAL_CORNER_RADIUS, BORDER_KEY, BORDER_STYLE_KEY, BORDER_VERTICAL_CORNER_RADIUS, BORDER_WIDTH, borderStyle, canDrawBorder, color, COLOR_KEY, FLAG_KEY, INVISIBLE_RECTANGLE, PARENT_PAGE_KEY, RECTANGLE_KEY, subtype, SUBTYPE_CIRCLE, SUBTYPE_HIGHLIGHT, SUBTYPE_LINE, SUBTYPE_LINK, SUBTYPE_POLYGON, SUBTYPE_POLYLINE, SUBTYPE_SQUARE, TYPE_VALUE, userSpaceRectangle, VISIBLE_RECTANGLE
 
Fields inherited from class org.icepdf.core.pobjects.Dictionary
entries, inited, isDeleted, isNew, library, SUBTYPE_KEY, TYPE_KEY
 
Constructor Summary
LinkAnnotation(Library l, java.util.Hashtable h)
          Creates a new instance of a LinkAnnotation.
 
Method Summary
 Destination getDestination()
          A destination to be displayed when the annotation is ativated.
 java.lang.String getHighlightMode()
          Gets the link annotations highlight mode (visual effect)taht should be displayed when the mouse button is pressed or held down inside it's active area.
 
Methods inherited from class org.icepdf.core.pobjects.annotations.Annotation
addAction, allowAlterProperties, allowPrintNormalMode, allowScreenDownMode, allowScreenNormalMode, allowScreenOrPrintRenderingOrInteraction, allowScreenRolloverMode, buildAnnotation, deleteAction, getAction, getBorder, getBorderStyle, getColor, getFlagHidden, getFlagInvisible, getFlagLocked, getFlagNoRotate, getFlagNoView, getFlagNoZoom, getFlagPrint, getFlagReadOnly, getFlagToggleNoView, getLineStyle, getLineThickness, getLinkType, getPage, getParentAnnotation, getSubType, getUserSpaceRectangle, isBorder, isSupportedAnnotationType, render, renderAppearanceStream, renderBorder, renderBorderTabSelected, setBorderStyle, setColor, setUserSpaceRectangle, toString, updateAction
 
Methods inherited from class org.icepdf.core.pobjects.Dictionary
getEntries, getFloat, getInt, getLibrary, getNumber, getObject, getObject, getPObjectReference, init, isDeleted, isNew, setDeleted, setNew, setPObjectReference
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DESTINATION_KEY

public static final Name DESTINATION_KEY
Key used to indcate highlight mode.


HIGHLIGHT_MODE_KEY

public static final Name HIGHLIGHT_MODE_KEY
Key used to indcate highlight mode.


HIGHLIGHT_NONE

public static final java.lang.String HIGHLIGHT_NONE
Indicates that the annotation has no highlight effect.

See Also:
Constant Field Values

HIGHLIGHT_INVERT

public static final java.lang.String HIGHLIGHT_INVERT
Indicates that the annotation rectangle colours should be inverted for its highlight effect.

See Also:
Constant Field Values

HIGHLIGHT_OUTLINE

public static final java.lang.String HIGHLIGHT_OUTLINE
Indicates that the annotation rectangle border should be inverted for its highlight effect.

See Also:
Constant Field Values

HIGHLIGHT_PUSH

public static final java.lang.String HIGHLIGHT_PUSH
Indicates that the annotation rectangle border should be pushed below the surface of th page.

See Also:
Constant Field Values
Constructor Detail

LinkAnnotation

public LinkAnnotation(Library l,
                      java.util.Hashtable h)
Creates a new instance of a LinkAnnotation.

Parameters:
l - document library.
h - dictionary entries.
Method Detail

getHighlightMode

public java.lang.String getHighlightMode()

Gets the link annotations highlight mode (visual effect)taht should be displayed when the mouse button is pressed or held down inside it's active area.

Returns:
one of the predefined highlight effects, HIGHLIGHT_NONE, HIGHLIGHT_OUTLINE or HIGHLIGHT_PUSH.

getDestination

public Destination getDestination()
A destination to be displayed when the annotation is ativated. Only permitted if an A entry is not present.

Returns:
annotation target destination, null if not present in annotation.