Package com.itextpdf.forms.xfdf
Class ActionObject
java.lang.Object
com.itextpdf.forms.xfdf.ActionObject
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets Dest, inner element of link, GoTo, and GoToR elements.Gets the string value of OriginalName, required attribute of File inner element of GoToR or Launch element.Gets the value of Name, required attribute of Named element.getType()
Returns the type of inner action element.getUri()
Gets the string value of URI elements.boolean
isMap()
Gets IsMap, optional attribute of URI element.boolean
Gets the boolean value of NewWindow, optional attribute of Launch element.setDestination
(DestObject destination) Sets Dest, inner element of link, GoTo, and GoToR elements.setFileOriginalName
(String fileOriginalName) Sets the string value of OriginalName, required attribute of File inner element of GoToR or Launch element.setMap
(boolean map) Sets IsMap, optional attribute of URI element.setNameAction
(PdfName nameAction) Sets the value of Name, required attribute of Named element.setNewWindow
(boolean newWindow) Sets the boolean value of NewWindow, optional attribute of Launch element.Sets the type of inner action element.Sets the string value of URI element.
-
Constructor Details
-
ActionObject
Creates an instance ofActionObject
.- Parameters:
-
type
- type of inner action element. Possible values:PdfName.URI
,PdfName.Launch
,PdfName.GoTo
,PdfName.GoToR
,PdfName.Named
-
-
Method Details
-
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
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
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
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
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
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
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
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
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
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
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
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
.
-