Class InternalLink


  • public class InternalLink
    extends Link

    A document-wide link

    • Method Detail

      • create

        public static InternalLink create​(Document targetDocument,
                                          Rectangle boundingBox,
                                          Destination target)

        Create a document-internal link

        The link is associated with the targetDocument but not yet part of any page. It can be added to a page's list of links.
        Parameters:
        targetDocument - The document in which the links is used
        boundingBox - The location on the page.
        target - The link target
        Returns:
        The newly created object
        Throws:
        java.lang.IllegalArgumentException - if the targetDocument argument has already been closed
        java.lang.IllegalArgumentException - if the targetDocument argument is read-only
        java.lang.IllegalArgumentException - if the target argument is not associated with the targetDocument
        java.lang.IllegalArgumentException - if targetDocument is null
        java.lang.IllegalArgumentException - if boundingBox is null
        java.lang.IllegalArgumentException - if target is null
      • createFromQuadrilaterals

        public static InternalLink createFromQuadrilaterals​(Document targetDocument,
                                                            QuadrilateralList activeArea,
                                                            Destination target)

        Create a document-internal link with defined link area

        The link has an active area defined by the given activeArea. The link is associated with the targetDocument but not yet part of any page. It can be added to a page's list of links.
        Parameters:
        targetDocument - The document in which the links is used
        activeArea - The active link area on the page.
        target - The link target
        Returns:
        The newly created object
        Throws:
        java.lang.IllegalArgumentException - if the targetDocument argument has already been closed
        java.lang.IllegalArgumentException - if the targetDocument argument is read-only
        java.lang.IllegalArgumentException - if the target argument is not associated with the targetDocument
        java.lang.IllegalArgumentException - if the activeArea is empty
        java.lang.IllegalArgumentException - if targetDocument is null
        java.lang.IllegalArgumentException - if activeArea is null
        java.lang.IllegalArgumentException - if target is null
      • getDestination

        public Destination getDestination()

        The link target (Getter)

        Throws:
        java.lang.IllegalStateException - if the object has already been closed
        java.lang.IllegalStateException - if the link has no destination