Class GoToXYAction

    • Constructor Detail

      • GoToXYAction

        public GoToXYAction​(java.lang.String id)
        Creates a new instance with yet unknown location.
        Parameters:
        id - the identifier for this action
      • GoToXYAction

        public GoToXYAction​(java.lang.String id,
                            int pageIndex,
                            java.awt.Point targetLocation,
                            PageIndexContext ifContext)
        Creates a new instance.
        Parameters:
        id - the identifier for this action
        pageIndex - the index (0-based) of the target page, -1 if the page index is still unknown
        targetLocation - the absolute location on the page (coordinates in millipoints), or null, if the position isn't known, yet
    • Method Detail

      • 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

        public java.awt.Point 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

        public void setTargetLocation​(java.awt.Point location)
        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 class AbstractAction
        Returns:
        true if the action is complete
      • isSame

        public boolean isSame​(AbstractAction other)
        Indicates whether two action are equal. Note: this is not the same as Object.equals(Object)!
        Specified by:
        isSame in class AbstractAction
        Parameters:
        other - the other action to compare to
        Returns:
        true if the actions are equal
      • toSAX

        public void toSAX​(org.xml.sax.ContentHandler handler)
                   throws org.xml.sax.SAXException
        Specified by:
        toSAX in interface org.apache.xmlgraphics.util.XMLizable
        Throws:
        org.xml.sax.SAXException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object