Class GoToXYAction
java.lang.Object
org.apache.fop.render.intermediate.extensions.AbstractAction
org.apache.fop.render.intermediate.extensions.GoToXYAction
- All Implemented Interfaces:
DocumentNavigationExtensionConstants
,org.apache.xmlgraphics.util.XMLizable
Action class which represents a "go-to" action to an absolute coordinate on a page.
-
Field Summary
Fields inherited from interface org.apache.fop.render.intermediate.extensions.DocumentNavigationExtensionConstants
BOOKMARK, BOOKMARK_TREE, GOTO_URI, GOTO_XY, LINK, NAMED_DESTINATION, NAMESPACE, PREFIX
-
Constructor Summary
ConstructorsConstructorDescriptionGoToXYAction
(String id) Creates a new instance with yet unknown location.GoToXYAction
(String id, int pageIndex, Point targetLocation, PageIndexContext ifContext) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the page index of the target page.Returns the absolute coordinates of the target location on the page.boolean
Indicates whether the action is complete, i.e has all the required information to be rendered in the target format.boolean
isSame
(AbstractAction other) Indicates whether two action are equal.void
setPageIndex
(int pageIndex) Sets the index of the target page.void
setTargetLocation
(Point location) Sets the absolute coordinates of the target location on the page.void
toSAX
(ContentHandler handler) toString()
Methods inherited from class org.apache.fop.render.intermediate.extensions.AbstractAction
getID, getIDPrefix, getStructureTreeElement, hasID, setID, setStructureTreeElement
-
Constructor Details
-
GoToXYAction
Creates a new instance with yet unknown location.- Parameters:
id
- the identifier for this action
-
GoToXYAction
Creates a new instance.- Parameters:
id
- the identifier for this actionpageIndex
- the index (0-based) of the target page, -1 if the page index is still unknowntargetLocation
- the absolute location on the page (coordinates in millipoints), or null, if the position isn't known, yet
-
-
Method Details
-
setPageIndex
public void setPageIndex(int pageIndex) Sets the index of the target page.- Parameters:
pageIndex
- the index (0-based) of the target page
-
getPageIndex
public int getPageIndex()Returns the page index of the target page.This function will always return a valid value for safety. Use
isComplete()
to check if the link is actually complete.- Returns:
- the page index (0-based)
-
getTargetLocation
Returns the absolute coordinates of the target location on the page.This function will always return a valid value for safety. Use
isComplete()
to check if the link is actually complete.- Returns:
- the target location (coordinates in millipoints)
-
setTargetLocation
Sets the absolute coordinates of the target location on the page.- Parameters:
location
- the location (coordinates in millipoints)
-
isComplete
public boolean isComplete()Indicates whether the action is complete, i.e has all the required information to be rendered in the target format.- Overrides:
isComplete
in classAbstractAction
- Returns:
- true if the action is complete
-
isSame
Indicates whether two action are equal. Note: this is not the same asObject.equals(Object)
!- Specified by:
isSame
in classAbstractAction
- Parameters:
other
- the other action to compare to- Returns:
- true if the actions are equal
-
toSAX
- Specified by:
toSAX
in interfaceorg.apache.xmlgraphics.util.XMLizable
- Throws:
SAXException
-
toString
-