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 HSLFHyperlink
Find hyperlink assigned to the supplied shapestatic List
<HSLFHyperlink> find
(HSLFTextShape shape) Find hyperlinks in a text shapeHyperlink address.int
Gets the ending character positionint
getId()
getInfo()
getLabel()
Return text label for this hyperlinkint
Gets the beginning character positiongetType()
Gets the type of the hyperlink action.Deprecated.void
linkToEmail
(String emailAddress) Link to an emailvoid
Link to the first slide in this slideshowvoid
Link to the last slide in this slideshowvoid
Link to the next slide (relative from the current)void
Link to the previous slide (relative from the current)void
linkToSlide
(Slide<HSLFShape, HSLFTextParagraph> slide) Link to a slide in this slideshowvoid
Link to a web page / URLvoid
setAddress
(String str) Hyperlink address.void
setEndIndex
(int endIndex) Sets the ending character positionvoid
Sets text label for this hyperlinkvoid
setStartIndex
(int startIndex) Sets the beginning character positionprotected void
setTextRunInfo
(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.usegetType
insteadGets the type of the hyperlink action. Must be aLINK_*
constant- Specified by:
getTypeEnum
in interfaceHyperlink
- Returns:
- the hyperlink URL
- See Also:
-
linkToEmail
Description copied from interface:Hyperlink
Link to an email- Specified by:
linkToEmail
in interfaceHyperlink<HSLFShape,
HSLFTextParagraph> - Parameters:
emailAddress
- the email address
-
linkToUrl
Description copied from interface:Hyperlink
Link to a web page / URL- Specified by:
linkToUrl
in interfaceHyperlink<HSLFShape,
HSLFTextParagraph> - Parameters:
url
- the url
-
linkToSlide
Description copied from interface:Hyperlink
Link to a slide in this slideshow- Specified by:
linkToSlide
in interfaceHyperlink<HSLFShape,
HSLFTextParagraph> - Parameters:
slide
- the linked slide
-
linkToNextSlide
public void linkToNextSlide()Description copied from interface:Hyperlink
Link to the next slide (relative from the current)- Specified by:
linkToNextSlide
in interfaceHyperlink<HSLFShape,
HSLFTextParagraph>
-
linkToPreviousSlide
public void linkToPreviousSlide()Description copied from interface:Hyperlink
Link to the previous slide (relative from the current)- Specified by:
linkToPreviousSlide
in interfaceHyperlink<HSLFShape,
HSLFTextParagraph>
-
linkToFirstSlide
public void linkToFirstSlide()Description copied from interface:Hyperlink
Link to the first slide in this slideshow- Specified by:
linkToFirstSlide
in interfaceHyperlink<HSLFShape,
HSLFTextParagraph>
-
linkToLastSlide
public void linkToLastSlide()Description copied from interface:Hyperlink
Link to the last slide in this slideshow- Specified by:
linkToLastSlide
in interfaceHyperlink<HSLFShape,
HSLFTextParagraph>
-
getAddress
Description copied from interface:Hyperlink
Hyperlink address. Depending on the hyperlink type it can be URL, e-mail, path to a file, etc.- Specified by:
getAddress
in interfaceHyperlink
- Returns:
- the address of this hyperlink
-
setAddress
Description copied from interface:Hyperlink
Hyperlink address. Depending on the hyperlink type it can be URL, e-mail, path to a file, etc.- Specified by:
setAddress
in interfaceHyperlink
- Parameters:
str
- the address of this hyperlink
-
getId
public int getId() -
getLabel
Description copied from interface:Hyperlink
Return text label for this hyperlink -
setLabel
Description copied from interface:Hyperlink
Sets 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
-TextRun
to lookup hyperlinks in- Returns:
- found hyperlinks or
null
if not found
-
find
Find hyperlinks in a text paragraph- Parameters:
paragraphs
- List ofTextParagraph
to lookup hyperlinks- Returns:
- found hyperlinks
-
find
Find hyperlink assigned to the supplied shape- Parameters:
shape
-Shape
to lookup hyperlink in- Returns:
- found hyperlink or
null
-
getType
instead