Class WebLink


  • public class WebLink
    extends Link

    An external link

    • Method Detail

      • create

        public static WebLink create​(Document targetDocument,
                                     Rectangle boundingBox,
                                     java.lang.String uri)

        Create an external 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.
        uri - 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 uri is empty
        java.lang.IllegalArgumentException - if targetDocument is null
        java.lang.IllegalArgumentException - if boundingBox is null
        java.lang.IllegalArgumentException - if uri is null
      • createFromQuadrilaterals

        public static WebLink createFromQuadrilaterals​(Document targetDocument,
                                                       QuadrilateralList activeArea,
                                                       java.lang.String uri)

        Create an external 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.
        uri - 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 activeArea is empty
        java.lang.IllegalArgumentException - if the uri is empty
        java.lang.IllegalArgumentException - if targetDocument is null
        java.lang.IllegalArgumentException - if activeArea is null
        java.lang.IllegalArgumentException - if uri is null
      • getUri

        public java.lang.String getUri()

        The link target (Getter)

        Throws:
        java.lang.IllegalStateException - if the object has already been closed
      • setUri

        public void setUri​(java.lang.String value)

        The link target (Setter)

        Throws:
        java.lang.IllegalStateException - if the object has already been closed
        java.lang.UnsupportedOperationException - if the document is read-only
        java.lang.IllegalArgumentException - if the given value is empty
        java.lang.IllegalStateException - if the link has already been appended to a page's list of links
        java.lang.IllegalArgumentException - if value is null