Package com.itextpdf.layout.element
Class Link
- java.lang.Object
-
- All Implemented Interfaces:
IAbstractElement,IElement,ILeafElement,IPropertyContainer,IAccessibleElement
public class Link extends Text
A clickable piece ofTextwhich contains alink 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
Constructors Constructor Description Link(java.lang.String text, PdfAction action)Creates a Link which can execute an action.Link(java.lang.String text, PdfLinkAnnotation linkAnnotation)Creates a Link with a fully constructed link annotation dictionary.Link(java.lang.String text, PdfDestination destination)Creates a Link to another location in the document.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AccessibilityPropertiesgetAccessibilityProperties()Gets theaccessibility properties.PdfLinkAnnotationgetLinkAnnotation()Gets the link annotation dictionary associated with this link.protected IRenderermakeNewRenderer()Creates a new renderer instance.-
Methods inherited from class com.itextpdf.layout.element.Text
disableOtfFeatures, 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, getTransparentStrokeColor, hasOwnProperty, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundImage, setBackgroundImage, setBaseDirection, setBorder, setBorderBottom, setBorderBottomLeftRadius, setBorderBottomRightRadius, setBorderLeft, setBorderRadius, setBorderRight, setBorderTop, setBorderTopLeftRadius, setBorderTopRightRadius, setCharacterSpacing, setDashPattern, setDestination, setFixedPosition, setFixedPosition, setFixedPosition, setFixedPosition, setFont, setFontColor, setFontColor, setFontColor, setFontFamily, setFontFamily, setFontKerning, setFontScript, setFontSize, setHorizontalAlignment, setHyphenation, setLineThrough, setOpacity, setProperty, setRelativePosition, setSplitCharacters, setStrokeColor, setStrokeColor, setStrokeColor, setStrokeWidth, setTextAlignment, setTextRenderingMode, setUnderline, 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 Detail
-
Link
public Link(java.lang.String text, PdfLinkAnnotation linkAnnotation)Creates a Link with a fully constructed link annotation dictionary.- Parameters:
text- the textual contents of the linklinkAnnotation- aPdfLinkAnnotation
-
Link
public Link(java.lang.String text, PdfAction action)Creates a Link which can execute an action.- Parameters:
text- the textual contents of the linkaction- aPdfAction
-
Link
public Link(java.lang.String text, PdfDestination destination)Creates a Link to another location in the document.- Parameters:
text- the textual contents of the linkdestination- aPdfDestination
-
-
Method Detail
-
getLinkAnnotation
public PdfLinkAnnotation getLinkAnnotation()
Gets the link annotation dictionary associated with this link.- Returns:
- a
PdfLinkAnnotation
-
getAccessibilityProperties
public AccessibilityProperties getAccessibilityProperties()
Description copied from interface:IAccessibleElementGets theaccessibility properties. See alsoIAccessibleElement.- Specified by:
getAccessibilityPropertiesin interfaceIAccessibleElement- Overrides:
getAccessibilityPropertiesin classText- Returns:
- an interface that allows to specify properties of a tagged element in Tagged PDF.
-
makeNewRenderer
protected IRenderer makeNewRenderer()
Description copied from class:AbstractElementCreates a new renderer instance.- Overrides:
makeNewRendererin classText- Returns:
- new
IRenderer
-
-