Class ActionObject

java.lang.Object
com.itextpdf.forms.xfdf.ActionObject

public class ActionObject extends Object
Represent Action tag in xfdf document structure. Content model: ( URI | Launch | GoTo | GoToR | Named ). Attributes: none. For more details see paragraph 6.5.1 in Xfdf specification.
  • Constructor Details

    • ActionObject

      public ActionObject (PdfName type)
  • Method Details

    • getType

      public PdfName getType()
      Returns the type of inner action element. Possible values: PdfName.URI, PdfName.Launch, PdfName.GoTo, PdfName.GoToR, PdfName.Named.
      Returns:
      PdfName type of inner action element
    • setType

      public ActionObject setType (PdfName type)
      Sets the type of inner action element. Possible values: PdfName.URI, PdfName.Launch, PdfName.GoTo, PdfName.GoToR, PdfName.Named.
      Parameters:
      type - PdfName type of inner action object
      Returns:
      current ActionObject
    • getUri

      public PdfString getUri()
      Gets the string value of URI elements. Corresponds to Name, required attribute of URI element. For more details see paragraph 6.5.30 in Xfdf specification.
      Returns:
      PdfString value of URI element
    • setUri

      public ActionObject setUri (PdfString uri)
      Sets the string value of URI element. Corresponds to Name, required attribute of URI element. For more details see paragraph 6.5.30 in Xfdf specification.
      Parameters:
      uri - PdfString value to be set to URI element
      Returns:
      current ActionObject
    • isMap

      public boolean isMap()
      Gets IsMap, optional attribute of URI element. For more details see paragraph 6.5.30 in Xfdf specification.
      Returns:
      boolean indicating if URI element is a map
    • setMap

      public ActionObject setMap (boolean map)
      Sets IsMap, optional attribute of URI element. For more details see paragraph 6.5.30 in Xfdf specification.
      Parameters:
      map - boolean indicating if URI element is a map
      Returns:
      current ActionObject
    • getNameAction

      public PdfName getNameAction()
      Gets the value of Name, required attribute of Named element. For more details see paragraph 6.5.24 in Xfdf specification.
      Returns:
      PdfName value of Name attribute of a named action element
    • setNameAction

      public ActionObject setNameAction (PdfName nameAction)
      Sets the value of Name, required attribute of Named element. For more details see paragraph 6.5.24 in Xfdf specification.
      Parameters:
      nameAction - PdfName value to be set to Name attribute of a named action element
      Returns:
      current ActionObject
    • getFileOriginalName

      public String getFileOriginalName()
      Gets the string value of OriginalName, required attribute of File inner element of GoToR or Launch element. Corresponds to F key in go-to action or launch dictionaries. For more details see paragraphs 6.5.11, 6.5.23 in Xfdf specification.
      Returns:
      String value of OriginalName attribute of current action object
    • setFileOriginalName

      public ActionObject setFileOriginalName (String fileOriginalName)
      Sets the string value of OriginalName, required attribute of File inner element of GoToR or Launch element. Corresponds to F key in go-to action or launch dictionaries. For more details see paragraphs 6.5.11, 6.5.23 in Xfdf specification.
      Parameters:
      fileOriginalName - String value of OriginalName attribute of action object
      Returns:
      current ActionObject
    • isNewWindow

      public boolean isNewWindow()
      Gets the boolean value of NewWindow, optional attribute of Launch element. For more details see paragraph 6.5.23 in Xfdf specification.
      Returns:
      boolean indicating if current Launch action element should be opened in a new window
    • setNewWindow

      public ActionObject setNewWindow (boolean newWindow)
      Sets the boolean value of NewWindow, optional attribute of Launch element. For more details see paragraph 6.5.23 in Xfdf specification.
      Parameters:
      newWindow - boolean indicating if current Launch action element should be opened in a new window
      Returns:
      current ActionObject
    • getDestination

      public DestObject getDestination()
      Gets Dest, inner element of link, GoTo, and GoToR elements. Corresponds to Dest key in link annotation dictionary. For more details see paragraph 6.5.10 in Xfdf specification.
      Returns:
      DestObject destination attribute of current action element
    • setDestination

      public ActionObject setDestination (DestObject destination)
      Sets Dest, inner element of link, GoTo, and GoToR elements. Corresponds to Dest key in link annotation dictionary. For more details see paragraph 6.5.10 in Xfdf specification.
      Parameters:
      destination - DestObject destination attribute of the action element
      Returns:
      current ActionObject