org.apache.pdfbox.pdmodel.interactive.action

## Class PDActionURI

- java.lang.Object
- - org.apache.pdfbox.pdmodel.interactive.action.PDAction
  - - org.apache.pdfbox.pdmodel.interactive.action.PDActionURI

All Implemented Interfaces:
  COSObjectable, PDDestinationOrAction

    public class PDActionURI
    extends PDAction

This represents a URI action that can be executed in a PDF document.

Author:
  Ben Litchfield, Panagiotis Toumasis

### Field Summary

Fields
`static String` `SUB_TYPE` This type of action this object represents.

### Fields inherited from class org.apache.pdfbox.pdmodel.interactive.action.PDAction

`action, TYPE`

### Constructor Summary

Constructors
Constructor and Description
`PDActionURI()` Default constructor.
`PDActionURI(COSDictionary a)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods
`String` `getS()` Deprecated. use `PDAction.getSubType()`.
`String` `getURI()` This will get the uniform resource identifier to resolve.
`void` `setS(String s)` Deprecated. use `PDAction.setSubType(java.lang.String)`.
`void` `setTrackMousePosition(boolean value)` This will specify whether to track the mouse position when the URI is resolved.
`void` `setURI(String uri)` This will set the uniform resource identifier to resolve, encoded in 7-bit ASCII.
`boolean` `shouldTrackMousePosition()` This will specify whether to track the mouse position when the URI is resolved.

### Methods inherited from class org.apache.pdfbox.pdmodel.interactive.action.PDAction

`getCOSObject, getNext, getSubType, getType, setNext, setSubType, setType`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### SUB_TYPE

    public static final String SUB_TYPE

This type of action this object represents.

See Also:
  Constant Field Values

### Constructor Detail

#### PDActionURI

    public PDActionURI()

Default constructor.

#### PDActionURI

    public PDActionURI(COSDictionary a)

Constructor.

Parameters:
  `a` - The action dictionary.

### Method Detail

#### getS

    @Deprecated
    public String getS()

Deprecated. use `PDAction.getSubType()`.
This will get the type of action that the actions dictionary describes. It must be URI for a URI action.

Returns:
  The S entry of the specific URI action dictionary.

#### setS

    @Deprecated
    public void setS(String s)

Deprecated. use `PDAction.setSubType(java.lang.String)`.
This will set the type of action that the actions dictionary describes. It must be URI for a URI action.

Parameters:
  `s` - The URI action.

#### getURI

    public String getURI()

This will get the uniform resource identifier to resolve. It should be encoded in 7-bit ASCII, but UTF-8 and UTF-16 are supported too.

Returns:
  The URI entry of the specific URI action dictionary or null if there isn't any.

#### setURI

    public void setURI(String uri)

This will set the uniform resource identifier to resolve, encoded in 7-bit ASCII.

Parameters:
  `uri` - The uniform resource identifier.

#### shouldTrackMousePosition

    public boolean shouldTrackMousePosition()

This will specify whether to track the mouse position when the URI is resolved. Default value: false. This entry applies only to actions triggered by the user's clicking an annotation; it is ignored for actions associated with outline items or with a document's OpenAction entry.

Returns:
  A flag specifying whether to track the mouse position when the URI is resolved.

#### setTrackMousePosition

    public void setTrackMousePosition(boolean value)

This will specify whether to track the mouse position when the URI is resolved.

Parameters:
  `value` - The flag value.