org.icepdf.core.pobjects.actions
Class Action

java.lang.Object
  extended by org.icepdf.core.pobjects.Dictionary
      extended by org.icepdf.core.pobjects.actions.Action
Direct Known Subclasses:
GoToAction, GoToRAction, LaunchAction, URIAction

public class Action
extends Dictionary

The Action class represents an Action Dictionary which defines characteristics and behavior of an action. A PDF action can be a wide variety of standard action types. This class is designed to help users get needed attributes from the Action Dictionary. The Dictionary classes getEntries method can be used to find other attributes associated with this action.

ICEpdf currently only uses the "GoTo" action when working with document outlines. If your application is interpreting a page's Annotations then you can query the Annotation object to get its Action.

Since:
1.0

Field Summary
static Name ACTION_TYPE
           
static Name ACTION_TYPE_GOTO
           
static Name ACTION_TYPE_GOTO_REMOTE
           
static Name ACTION_TYPE_KEY
           
static Name ACTION_TYPE_LAUNCH
           
static Name ACTION_TYPE_URI
           
static Name NEXT_KEY
           
 
Fields inherited from class org.icepdf.core.pobjects.Dictionary
entries, FORM_TYPE_KEY, inited, isDeleted, isNew, LENGTH_KEY, library, SUBTYPE_KEY, TYPE_KEY
 
Constructor Summary
Action(Library l, java.util.HashMap h)
          Creates a new instance of a Action.
 
Method Summary
static Action buildAction(Library library, java.util.HashMap hashMap)
           
 java.lang.String getType()
          Gets the type of action that this dictionary describes.
 boolean similar(Action obj)
           
 
Methods inherited from class org.icepdf.core.pobjects.Dictionary
getEntries, getFloat, getInt, getLibrary, getNumber, getObject, getPObjectReference, init, isDeleted, isNew, setDeleted, setNew, setPObjectReference, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ACTION_TYPE

public static final Name ACTION_TYPE

ACTION_TYPE_KEY

public static final Name ACTION_TYPE_KEY

NEXT_KEY

public static final Name NEXT_KEY

ACTION_TYPE_GOTO

public static final Name ACTION_TYPE_GOTO

ACTION_TYPE_GOTO_REMOTE

public static final Name ACTION_TYPE_GOTO_REMOTE

ACTION_TYPE_LAUNCH

public static final Name ACTION_TYPE_LAUNCH

ACTION_TYPE_URI

public static final Name ACTION_TYPE_URI
Constructor Detail

Action

public Action(Library l,
              java.util.HashMap h)
Creates a new instance of a Action.

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

buildAction

public static Action buildAction(Library library,
                                 java.util.HashMap hashMap)

getType

public java.lang.String getType()

Gets the type of action that this dictionary describes. The most common actions can be found in the PDF Reference 1.6 in section 8.5.3. ICEpdf currently only takes advantage of the "GoTo" action when a user clicks on a document outline.

Returns:
The action type.

similar

public boolean similar(Action obj)