com.icesoft.pdf.pobjects.annotations
Class LinkAnnotation

java.lang.Object
  extended bycom.icesoft.pdf.pobjects.Dictionary
      extended bycom.icesoft.pdf.pobjects.annotations.Annotation
          extended bycom.icesoft.pdf.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 × 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 int HIGHLIGHT_INVERT
          Indicates that the annotation rectangle colours should be inverted for its highlight effect.
static int HIGHLIGHT_NONE
          Indicates that the annotation has no highlight effect.
static int HIGHLIGHT_OUTLINE
          Indicates that the annotation rectangle border should be inverted for its highlight effect.
static int HIGHLIGHT_PUSH
          Indicates that the annotation rectangle border should be pushed below the surface of th page.
 
Fields inherited from class com.icesoft.pdf.pobjects.Dictionary
entries, inited, library
 
Constructor Summary
LinkAnnotation(Library l, Hashtable h)
          Creates a new instance of a LinkAnnotation.
 
Method Summary
protected  Color getBorderColor()
           
 Destination getDestination()
          A destination to be displayed when the annotation is ativated.
 int getHighlightMode()
          Gets the link annotations highlight mode (visual effect)taht shouldbe displayed when the mouse button is pressed or held down inside it's active area.
 
Methods inherited from class com.icesoft.pdf.pobjects.annotations.Annotation
allowAlterProperties, allowPrintNormalMode, allowScreenDownMode, allowScreenNormalMode, allowScreenOrPrintRenderingOrInteraction, allowScreenRolloverMode, buildAnnotation, getAction, getBorderStyle, getPage, getParentAnnotation, getSubType, getUserSpaceRectangle, isSupportedAnnotationType, render, renderAppearanceStream, renderBorder, renderBorderTabSelected, toString
 
Methods inherited from class com.icesoft.pdf.pobjects.Dictionary
getEntries, getFloat, getInt, getLibrary, getNumber, getObject, getPObjectReference, init, setPObjectReference
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

HIGHLIGHT_NONE

public static final int HIGHLIGHT_NONE
Indicates that the annotation has no highlight effect.

See Also:
Constant Field Values

HIGHLIGHT_INVERT

public static final int 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 int 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 int 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,
                      Hashtable h)
Creates a new instance of a LinkAnnotation.

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

getHighlightMode

public int getHighlightMode()

Gets the link annotations highlight mode (visual effect)taht shouldbe 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.

getBorderColor

protected Color getBorderColor()
Overrides:
getBorderColor in class Annotation
Returns:
A Color for the border, or null if none is to be used

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.