Package org.apache.poi.hslf.usermodel
Class HSLFHyperlink
java.lang.Object
org.apache.poi.hslf.usermodel.HSLFHyperlink
- All Implemented Interfaces:
Hyperlink,Hyperlink<HSLFShape,HSLFTextParagraph>
Represents a hyperlink in a PowerPoint document
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static List<HSLFHyperlink>find(List<HSLFTextParagraph> paragraphs) Find hyperlinks in a text paragraphprotected static HSLFHyperlinkFind hyperlink assigned to the supplied shapestatic List<HSLFHyperlink>find(HSLFTextShape shape) Find hyperlinks in a text shapeHyperlink address.intGets the ending character positionintgetId()getInfo()getLabel()Return text label for this hyperlinkintGets the beginning character positiongetType()Gets the type of the hyperlink action.Deprecated.voidlinkToEmail(String emailAddress) Link to an emailvoidLink to the first slide in this slideshowvoidLink to the last slide in this slideshowvoidLink to the next slide (relative from the current)voidLink to the previous slide (relative from the current)voidlinkToSlide(Slide<HSLFShape, HSLFTextParagraph> slide) Link to a slide in this slideshowvoidLink to a web page / URLvoidsetAddress(String str) Hyperlink address.voidsetEndIndex(int endIndex) Sets the ending character positionvoidSets text label for this hyperlinkvoidsetStartIndex(int startIndex) Sets the beginning character positionprotected voidsetTextRunInfo(TxInteractiveInfoAtom txinfo)
-
Constructor Details
-
HSLFHyperlink
-
-
Method Details
-
getExHyperlink
-
getInfo
-
getTextRunInfo
-
setTextRunInfo
-
getType
Gets the type of the hyperlink action. Must be aLINK_*constant -
getTypeEnum
Deprecated.usegetTypeinsteadGets the type of the hyperlink action. Must be aLINK_*constant- Specified by:
getTypeEnumin interfaceHyperlink- Returns:
- the hyperlink URL
- See Also:
-
linkToEmail
Description copied from interface:HyperlinkLink to an email- Specified by:
linkToEmailin interfaceHyperlink<HSLFShape,HSLFTextParagraph> - Parameters:
emailAddress- the email address
-
linkToUrl
Description copied from interface:HyperlinkLink to a web page / URL- Specified by:
linkToUrlin interfaceHyperlink<HSLFShape,HSLFTextParagraph> - Parameters:
url- the url
-
linkToSlide
Description copied from interface:HyperlinkLink to a slide in this slideshow- Specified by:
linkToSlidein interfaceHyperlink<HSLFShape,HSLFTextParagraph> - Parameters:
slide- the linked slide
-
linkToNextSlide
public void linkToNextSlide()Description copied from interface:HyperlinkLink to the next slide (relative from the current)- Specified by:
linkToNextSlidein interfaceHyperlink<HSLFShape,HSLFTextParagraph>
-
linkToPreviousSlide
public void linkToPreviousSlide()Description copied from interface:HyperlinkLink to the previous slide (relative from the current)- Specified by:
linkToPreviousSlidein interfaceHyperlink<HSLFShape,HSLFTextParagraph>
-
linkToFirstSlide
public void linkToFirstSlide()Description copied from interface:HyperlinkLink to the first slide in this slideshow- Specified by:
linkToFirstSlidein interfaceHyperlink<HSLFShape,HSLFTextParagraph>
-
linkToLastSlide
public void linkToLastSlide()Description copied from interface:HyperlinkLink to the last slide in this slideshow- Specified by:
linkToLastSlidein interfaceHyperlink<HSLFShape,HSLFTextParagraph>
-
getAddress
Description copied from interface:HyperlinkHyperlink address. Depending on the hyperlink type it can be URL, e-mail, path to a file, etc.- Specified by:
getAddressin interfaceHyperlink- Returns:
- the address of this hyperlink
-
setAddress
Description copied from interface:HyperlinkHyperlink address. Depending on the hyperlink type it can be URL, e-mail, path to a file, etc.- Specified by:
setAddressin interfaceHyperlink- Parameters:
str- the address of this hyperlink
-
getId
public int getId() -
getLabel
Description copied from interface:HyperlinkReturn text label for this hyperlink -
setLabel
Description copied from interface:HyperlinkSets text label for this hyperlink -
getStartIndex
public int getStartIndex()Gets the beginning character position- Returns:
- the beginning character position
-
setStartIndex
public void setStartIndex(int startIndex) Sets the beginning character position- Parameters:
startIndex- the beginning character position
-
getEndIndex
public int getEndIndex()Gets the ending character position- Returns:
- the ending character position
-
setEndIndex
public void setEndIndex(int endIndex) Sets the ending character position- Parameters:
endIndex- the ending character position
-
find
Find hyperlinks in a text shape- Parameters:
shape-TextRunto lookup hyperlinks in- Returns:
- found hyperlinks or
nullif not found
-
find
Find hyperlinks in a text paragraph- Parameters:
paragraphs- List ofTextParagraphto lookup hyperlinks- Returns:
- found hyperlinks
-
find
Find hyperlink assigned to the supplied shape- Parameters:
shape-Shapeto lookup hyperlink in- Returns:
- found hyperlink or
null
-
getTypeinstead