Package com.itextpdf.forms.xfdf
Class ActionObject
- java.lang.Object
-
- com.itextpdf.forms.xfdf.ActionObject
-
public class ActionObject extends java.lang.ObjectRepresent 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.
-
-
Field Summary
Fields Modifier and Type Field Description private DestObjectdestinationRepresents Dest, inner element of link, GoTo, and GoToR elements.private java.lang.StringfileOriginalNameRepresents OriginalName required attribute of File inner element of GoToR or Launch element.private booleanisMapRepresents IsMap, optional attribute of URI element.private booleanisNewWindowRepresents NewWindow, optional attribute of Launch element.private PdfNamenameActionRepresents Name, required attribute of Named element.private PdfNametypeType of inner action element.private PdfStringuriRepresents Name, required attribute of URI element.
-
Constructor Summary
Constructors Constructor Description ActionObject(PdfName type)Creates an instance ofActionObject.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DestObjectgetDestination()Gets Dest, inner element of link, GoTo, and GoToR elements.java.lang.StringgetFileOriginalName()Gets the string value of OriginalName, required attribute of File inner element of GoToR or Launch element.PdfNamegetNameAction()Gets the value of Name, required attribute of Named element.PdfNamegetType()Returns the type of inner action element.PdfStringgetUri()Gets the string value of URI elements.booleanisMap()Gets IsMap, optional attribute of URI element.booleanisNewWindow()Gets the boolean value of NewWindow, optional attribute of Launch element.ActionObjectsetDestination(DestObject destination)Sets Dest, inner element of link, GoTo, and GoToR elements.ActionObjectsetFileOriginalName(java.lang.String fileOriginalName)Sets the string value of OriginalName, required attribute of File inner element of GoToR or Launch element.ActionObjectsetMap(boolean map)Sets IsMap, optional attribute of URI element.ActionObjectsetNameAction(PdfName nameAction)Sets the value of Name, required attribute of Named element.ActionObjectsetNewWindow(boolean newWindow)Sets the boolean value of NewWindow, optional attribute of Launch element.ActionObjectsetType(PdfName type)Sets the type of inner action element.ActionObjectsetUri(PdfString uri)Sets the string value of URI element.
-
-
-
Field Detail
-
type
private PdfName type
Type of inner action element. Possible values:PdfName.URI,PdfName.Launch,PdfName.GoTo,PdfName.GoToR,PdfName.Named.
-
uri
private PdfString uri
Represents Name, required attribute of URI element. For more details see paragraph 6.5.30 in Xfdf specification.
-
isMap
private boolean isMap
Represents IsMap, optional attribute of URI element. For more details see paragraph 6.5.30 in Xfdf specification.
-
nameAction
private PdfName nameAction
Represents Name, required attribute of Named element. For more details see paragraph 6.5.24 in Xfdf specification.
-
fileOriginalName
private java.lang.String fileOriginalName
Represents 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.
-
isNewWindow
private boolean isNewWindow
Represents NewWindow, optional attribute of Launch element. For more details see paragraph 6.5.23 in Xfdf specification.
-
destination
private DestObject destination
Represents 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.
-
-
Constructor Detail
-
ActionObject
public ActionObject(PdfName type)
Creates an instance ofActionObject.- Parameters:
type- type of inner action element. Possible values:PdfName.URI,PdfName.Launch,PdfName.GoTo,PdfName.GoToR,PdfName.Named
-
-
Method Detail
-
getType
public PdfName getType()
Returns the type of inner action element. Possible values:PdfName.URI,PdfName.Launch,PdfName.GoTo,PdfName.GoToR,PdfName.Named.- Returns:
PdfNametype 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-PdfNametype 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:
PdfStringvalue 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-PdfStringvalue 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:
PdfNamevalue 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-PdfNamevalue to be set to Name attribute of a named action element- Returns:
- current
ActionObject.
-
getFileOriginalName
public java.lang.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:
Stringvalue of OriginalName attribute of current action object.
-
setFileOriginalName
public ActionObject setFileOriginalName(java.lang.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-Stringvalue 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:
DestObjectdestination 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-DestObjectdestination attribute of the action element- Returns:
- current
ActionObject.
-
-