public class GoToXYAction extends AbstractAction implements DocumentNavigationExtensionConstants
BOOKMARK, BOOKMARK_TREE, GOTO_URI, GOTO_XY, LINK, NAMED_DESTINATION, NAMESPACE, PREFIX
Constructor and Description |
---|
GoToXYAction(String id)
Creates a new instance with yet unknown location.
|
GoToXYAction(String id,
int pageIndex,
Point targetLocation,
PageIndexContext ifContext)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
int |
getPageIndex()
Returns the page index of the target page.
|
Point |
getTargetLocation()
Returns the absolute coordinates of the target location on the page.
|
boolean |
isComplete()
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) |
String |
toString() |
getID, getIDPrefix, getStructureTreeElement, hasID, setID, setStructureTreeElement
public GoToXYAction(String id)
id
- the identifier for this actionpublic GoToXYAction(String id, int pageIndex, Point targetLocation, PageIndexContext ifContext)
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, yetpublic void setPageIndex(int pageIndex)
pageIndex
- the index (0-based) of the target pagepublic int getPageIndex()
This function will always return a valid value for safety. Use
isComplete()
to check if the link is actually complete.
public Point getTargetLocation()
This function will always return a valid value for safety. Use
isComplete()
to check if the link is actually complete.
public void setTargetLocation(Point location)
location
- the location (coordinates in millipoints)public boolean isComplete()
isComplete
in class AbstractAction
public boolean isSame(AbstractAction other)
Object.equals(Object)
!isSame
in class AbstractAction
other
- the other action to compare topublic void toSAX(ContentHandler handler) throws SAXException
toSAX
in interface org.apache.xmlgraphics.util.XMLizable
SAXException
Copyright © 2025 Apache Software Foundation. All rights reserved.