Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.pdfbox.pdmodel.interactive.annotation
Class PDAnnotationLink

    java.lang.Object
      org.pdfbox.pdmodel.interactive.annotation.PDAnnotation
          org.pdfbox.pdmodel.interactive.annotation.PDAnnotationLink

All Implemented Interfaces:
  COSObjectable

public class PDAnnotationLink
extends PDAnnotation

This is the class that represents a link annotation.

Version:
  $Revision: 1.3 $
Author:
  Ben Litchfield, Paul King

Field Summary
`static String` | `HIGHLIGHT_MODE_INVERT` Constant values of the Text as defined in the PDF 1.6 reference Table 8.19.
`static String` | `HIGHLIGHT_MODE_NONE` Constant values of the Text as defined in the PDF 1.6 reference Table 8.19.
`static String` | `HIGHLIGHT_MODE_OUTLINE` Constant values of the Text as defined in the PDF 1.6 reference Table 8.19.
`static String` | `HIGHLIGHT_MODE_PUSH` Constant values of the Text as defined in the PDF 1.6 reference Table 8.19.
`static String` | `SUB_TYPE` The type of annotation.

Fields inherited from class org.pdfbox.pdmodel.interactive.annotation.PDAnnotation
`FLAG_HIDDEN, FLAG_INVISIBLE, FLAG_LOCKED, FLAG_NO_ROTATE, FLAG_NO_VIEW, FLAG_NO_ZOOM, FLAG_PRINTED, FLAG_READ_ONLY, FLAG_TOGGLE_NO_VIEW`

Constructor Summary
`PDAnnotationLink()` Constructor.
`PDAnnotationLink(COSDictionary field)` Creates a Link annotation from a COSDictionary, expected to be a correct object definition.

Method Summary
`PDDestination` | `getDestination()` Get the destination to be displayed when the annotation is activated.
`String` | `getHighlightMode()` Set the highlight mode for when the mouse is depressed.
`PDActionURI` | `getPreviousURI()` This will set the previous URI action, in case it's needed.
`float[]` | `getQuadPoints()` This will retrieve the set of quadpoints which encompass the areas of this annotation which will activate.
`void` | `setDestination(PDDestination dest)` The new destination value.
`void` | `setHighlightMode(String mode)` Set the highlight mode.
`void` | `setPreviousURI(PDActionURI pa)` This will set the previous URI action, in case it needs to be retrieved at later date.
`void` | `setQuadPoints(float[] quadPoints)` This will set the set of quadpoints which encompass the areas of this annotation which will activate.

Methods inherited from class org.pdfbox.pdmodel.interactive.annotation.PDAnnotation
`createAnnotation, getAction, getActions, getAnnotationFlags, getAnnotationName, getAppearance, getAppearanceStream, getBoderStyle, getColour, getContents, getCOSObject, getDictionary, getModifiedDate, getRectangle, isHidden, isInvisible, isLocked, isNoRotate, isNoView, isNoZoom, isPrinted, isReadOnly, isToggleNoView, setAction, setActions, setAnnotationFlags, setAnnotationName, setAppearance, setAppearanceStream, setBorderStyle, setColour, setContents, setHidden, setInvisible, setLocked, setModifiedDate, setNoRotate, setNoView, setNoZoom, setPrinted, setReadOnly, setRectangle, setToggleNoView`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### HIGHLIGHT_MODE_NONE

    public static final String HIGHLIGHT_MODE_NONE

  Constant values of the Text as defined in the PDF 1.6 reference Table 8.19.

  See Also:
    Constant Field Values

### HIGHLIGHT_MODE_INVERT

    public static final String HIGHLIGHT_MODE_INVERT

  Constant values of the Text as defined in the PDF 1.6 reference Table 8.19.

  See Also:
    Constant Field Values

### HIGHLIGHT_MODE_OUTLINE

    public static final String HIGHLIGHT_MODE_OUTLINE

  Constant values of the Text as defined in the PDF 1.6 reference Table 8.19.

  See Also:
    Constant Field Values

### HIGHLIGHT_MODE_PUSH

    public static final String HIGHLIGHT_MODE_PUSH

  Constant values of the Text as defined in the PDF 1.6 reference Table 8.19.

  See Also:
    Constant Field Values

### SUB_TYPE

    public static final String SUB_TYPE

  The type of annotation.

  See Also:
    Constant Field Values

Constructor Detail

### PDAnnotationLink

    public PDAnnotationLink()

  Constructor.

### PDAnnotationLink

    public PDAnnotationLink(COSDictionary field)

  Creates a Link annotation from a COSDictionary, expected to be a correct object definition.

Parameters:
  `field` - the PDF objet to represent as a field.

Method Detail

### getDestination

    public PDDestination getDestination()
                                 throws IOException

  Get the destination to be displayed when the annotation is activated. Either this or the A should be set but not both.

  Returns:
    The destination for this annotation.
  Throws:
    `IOException` - If there is an error creating the destination.

### setDestination

    public void setDestination(PDDestination dest)

  The new destination value.

  Parameters:
    `dest` - The updated destination.

### getHighlightMode

    public String getHighlightMode()

  Set the highlight mode for when the mouse is depressed. See the HIGHLIGHT_MODE_XXX constants.

  Returns:
    The string representation of the highlight mode.

### setHighlightMode

    public void setHighlightMode(String mode)

  Set the highlight mode. See the HIGHLIGHT_MODE_XXX constants.

  Parameters:
    `mode` - The new highlight mode.

### setPreviousURI

    public void setPreviousURI(PDActionURI pa)

  This will set the previous URI action, in case it needs to be retrieved at later date.

  Parameters:
    `pa` - The previous URI.

### getPreviousURI

    public PDActionURI getPreviousURI()

  This will set the previous URI action, in case it's needed.

  Returns:
    The previous URI.

### setQuadPoints

    public void setQuadPoints(float[] quadPoints)

  This will set the set of quadpoints which encompass the areas of this annotation which will activate.

  Parameters:
    `quadPoints` - an array representing the set of area covered.

### getQuadPoints

    public float[] getQuadPoints()

  This will retrieve the set of quadpoints which encompass the areas of this annotation which will activate.

  Returns:
    An array of floats representing the quad points.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD