Class WebLink
- java.lang.Object
-
- com.pdftools.toolbox.internal.NativeBase
-
- com.pdftools.toolbox.internal.NativeObject
-
- com.pdftools.toolbox.pdf.navigation.Link
-
- com.pdftools.toolbox.pdf.navigation.WebLink
-
public class WebLink extends Link
An external link
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WebLinkcreate(Document targetDocument, Rectangle boundingBox, java.lang.String uri)Create an external linkstatic WebLinkcreateFromQuadrilaterals(Document targetDocument, QuadrilateralList activeArea, java.lang.String uri)Create an external link with defined link areajava.lang.StringgetUri()The link target (Getter)voidsetUri(java.lang.String value)The link target (Setter)-
Methods inherited from class com.pdftools.toolbox.pdf.navigation.Link
copy, getActiveArea, getBoundingBox, getHidden, getNoPrint, setBorderStyle
-
Methods inherited from class com.pdftools.toolbox.internal.NativeObject
equals, hashCode
-
-
-
-
Method Detail
-
create
public static WebLink create(Document targetDocument, Rectangle boundingBox, java.lang.String uri)
Create an external link
The link is associated with thetargetDocumentbut 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 usedboundingBox- The location on the page.uri- The link target- Returns:
- The newly created object
- Throws:
java.lang.IllegalArgumentException- if thetargetDocumentargument has already been closedjava.lang.IllegalArgumentException- if thetargetDocumentargument is read-onlyjava.lang.IllegalArgumentException- if theuriis emptyjava.lang.IllegalArgumentException- iftargetDocumentisnulljava.lang.IllegalArgumentException- ifboundingBoxisnulljava.lang.IllegalArgumentException- ifuriisnull
-
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 givenactiveArea. The link is associated with thetargetDocumentbut 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 usedactiveArea- The active link area on the page.uri- The link target- Returns:
- The newly created object
- Throws:
java.lang.IllegalArgumentException- if thetargetDocumentargument has already been closedjava.lang.IllegalArgumentException- if thetargetDocumentargument is read-onlyjava.lang.IllegalArgumentException- if theactiveAreais emptyjava.lang.IllegalArgumentException- if theuriis emptyjava.lang.IllegalArgumentException- iftargetDocumentisnulljava.lang.IllegalArgumentException- ifactiveAreaisnulljava.lang.IllegalArgumentException- ifuriisnull
-
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 closedjava.lang.UnsupportedOperationException- if the document is read-onlyjava.lang.IllegalArgumentException- if the given value is emptyjava.lang.IllegalStateException- if the link has already been appended to a page's list of linksjava.lang.IllegalArgumentException- ifvalueisnull
-
-