Class WebLink
- java.lang.Object
-
- com.pdf_tools.fourheights.pdftoolbox.internal.NativeBase
-
- com.pdf_tools.fourheights.pdftoolbox.internal.NativeObject
-
- com.pdf_tools.fourheights.pdftoolbox.pdf.navigation.Link
-
- com.pdf_tools.fourheights.pdftoolbox.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 WebLink
create(Document targetDocument, Rectangle boundingBox, java.lang.String uri)
Create an external linkstatic WebLink
createFromQuadrilaterals(Document targetDocument, QuadrilateralList activeArea, java.lang.String uri)
Create an external link with defined link areajava.lang.String
getUri()
The link target (Getter)void
setUri(java.lang.String value)
The link target (Setter)-
Methods inherited from class com.pdf_tools.fourheights.pdftoolbox.pdf.navigation.Link
copy, getActiveArea, getBoundingBox, getHidden, getNoPrint, setBorderStyle
-
Methods inherited from class com.pdf_tools.fourheights.pdftoolbox.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 thetargetDocument
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 usedboundingBox
- The location on the page.uri
- The link target- Returns:
- The newly created object
- Throws:
java.lang.IllegalArgumentException
- if thetargetDocument
argument has already been closedjava.lang.IllegalArgumentException
- if thetargetDocument
argument is read-onlyjava.lang.IllegalArgumentException
- if theuri
is emptyjava.lang.IllegalArgumentException
- iftargetDocument
isnull
java.lang.IllegalArgumentException
- ifboundingBox
isnull
java.lang.IllegalArgumentException
- ifuri
isnull
-
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 thetargetDocument
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 usedactiveArea
- The active link area on the page.uri
- The link target- Returns:
- The newly created object
- Throws:
java.lang.IllegalArgumentException
- if thetargetDocument
argument has already been closedjava.lang.IllegalArgumentException
- if thetargetDocument
argument is read-onlyjava.lang.IllegalArgumentException
- if theactiveArea
is emptyjava.lang.IllegalArgumentException
- if theuri
is emptyjava.lang.IllegalArgumentException
- iftargetDocument
isnull
java.lang.IllegalArgumentException
- ifactiveArea
isnull
java.lang.IllegalArgumentException
- ifuri
isnull
-
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
- ifvalue
isnull
-
-