Package com.itextpdf.layout.element
Class Link
- All Implemented Interfaces:
-
IAbstractElement
,IElement
,ILeafElement
,IPropertyContainer
,IAccessibleElement
A clickable piece of
Text
which contains a link annotation dictionary
. The concept is largely similar to that of the HTML anchor tag.
-
Field Summary
Fields inherited from class com.itextpdf.layout.element.Text
tagProperties, text
Fields inherited from class com.itextpdf.layout.element.AbstractElement
childElements, nextRenderer, styles
Fields inherited from class com.itextpdf.layout.ElementPropertyContainer
properties
-
Constructor Summary
ConstructorDescriptionCreates a Link which can execute an action.Link
(String text, PdfLinkAnnotation linkAnnotation) Creates a Link with a fully constructed link annotation dictionary.Link
(String text, PdfDestination destination) Creates a Link to another location in the document. -
Method Summary
Modifier and TypeMethodDescriptionGets theaccessibility properties
.Gets the link annotation dictionary associated with this link.protected IRenderer
Creates new renderer instance.Methods inherited from class com.itextpdf.layout.element.Text
getHorizontalScaling, getText, getTextRise, setHorizontalScaling, setNeutralRole, setSkew, setText, setTextRise
Methods inherited from class com.itextpdf.layout.element.AbstractElement
addStyle, createRendererSubTree, getChildren, getProperty, getRenderer, hasProperty, isEmpty, setAction, setNextRenderer, setPageNumber
Methods inherited from class com.itextpdf.layout.ElementPropertyContainer
deleteOwnProperty, getDefaultProperty, getOwnProperty, getSplitCharacters, getStrokeColor, getStrokeWidth, getTextRenderingMode, hasOwnProperty, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundImage, setBackgroundImage, setBaseDirection, setBorder, setBorderBottom, setBorderBottomLeftRadius, setBorderBottomRightRadius, setBorderLeft, setBorderRadius, setBorderRight, setBorderTop, setBorderTopLeftRadius, setBorderTopRightRadius, setCharacterSpacing, setDestination, setFixedPosition, setFixedPosition, setFixedPosition, setFixedPosition, setFont, setFontColor, setFontColor, setFontColor, setFontFamily, setFontFamily, setFontKerning, setFontScript, setFontSize, setHorizontalAlignment, setHyphenation, setLineThrough, setOpacity, setProperty, setRelativePosition, setSplitCharacters, setStrokeColor, setStrokeWidth, setTextAlignment, setTextRenderingMode, setUnderline, setUnderline, setUnderline, setUnderline, setWordSpacing, simulateBold, simulateItalic
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.itextpdf.layout.element.IElement
createRendererSubTree, getRenderer, setNextRenderer
Methods inherited from interface com.itextpdf.layout.IPropertyContainer
deleteOwnProperty, getDefaultProperty, getOwnProperty, getProperty, hasOwnProperty, hasProperty, setProperty
-
Constructor Details
-
Link
Creates a Link with a fully constructed link annotation dictionary.- Parameters:
-
text
- the textual contents of the link -
linkAnnotation
- aPdfLinkAnnotation
-
Link
Creates a Link which can execute an action.- Parameters:
-
text
- the textual contents of the link -
action
- aPdfAction
-
-
Method Details
-
getLinkAnnotation
Gets the link annotation dictionary associated with this link.- Returns:
-
a
PdfLinkAnnotation
-
getAccessibilityProperties
Description copied from interface:IAccessibleElement
Gets theaccessibility properties
. See alsoIAccessibleElement
.- Specified by:
-
getAccessibilityProperties
in interfaceIAccessibleElement
- Overrides:
-
getAccessibilityProperties
in classText
- Returns:
- an interface that allows to specify properties of a tagged element in Tagged PDF.
-
makeNewRenderer
Description copied from class:AbstractElement
Creates new renderer instance.- Overrides:
-
makeNewRenderer
in classText
- Returns:
-
new
IRenderer
-