Package org.apache.poi.hslf.usermodel
Class HSLFHyperlink
- java.lang.Object
-
- org.apache.poi.hslf.usermodel.HSLFHyperlink
-
- All Implemented Interfaces:
Hyperlink
,Hyperlink<HSLFShape,HSLFTextParagraph>
public final class HSLFHyperlink extends java.lang.Object implements Hyperlink<HSLFShape,HSLFTextParagraph>
Represents a hyperlink in a PowerPoint document
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.util.List<HSLFHyperlink>
find(HSLFTextShape shape)
Find hyperlinks in a text shapejava.lang.String
getAddress()
Hyperlink address.int
getEndIndex()
Gets the ending character positionExHyperlink
getExHyperlink()
int
getId()
InteractiveInfo
getInfo()
java.lang.String
getLabel()
Return text label for this hyperlinkint
getStartIndex()
Gets the beginning character positionTxInteractiveInfoAtom
getTextRunInfo()
HyperlinkType
getType()
Gets the type of the hyperlink action.HyperlinkType
getTypeEnum()
Deprecated.usegetType
insteadvoid
linkToEmail(java.lang.String emailAddress)
Link to an emailvoid
linkToFirstSlide()
Link to the first slide in this slideshowvoid
linkToLastSlide()
Link to the last slide in this slideshowvoid
linkToNextSlide()
Link to the next slide (relative from the current)void
linkToPreviousSlide()
Link to the previous slide (relative from the current)void
linkToSlide(Slide<HSLFShape,HSLFTextParagraph> slide)
Link to a slide in this slideshowvoid
linkToUrl(java.lang.String url)
Link to a web page / URLvoid
setAddress(java.lang.String str)
Hyperlink address.void
setEndIndex(int endIndex)
Sets the ending character positionvoid
setLabel(java.lang.String label)
Sets text label for this hyperlinkvoid
setStartIndex(int startIndex)
Sets the beginning character position
-
-
-
Method Detail
-
getExHyperlink
public ExHyperlink getExHyperlink()
-
getInfo
public InteractiveInfo getInfo()
-
getTextRunInfo
public TxInteractiveInfoAtom getTextRunInfo()
-
getType
public HyperlinkType getType()
Gets the type of the hyperlink action. Must be aLINK_*
constant- Specified by:
getType
in interfaceHyperlink
- Returns:
- the hyperlink URL
- See Also:
InteractiveInfoAtom
-
getTypeEnum
@Deprecated @Removal(version="4.2") public HyperlinkType 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:
InteractiveInfoAtom
-
linkToEmail
public void linkToEmail(java.lang.String emailAddress)
Description copied from interface:Hyperlink
Link to an email- Specified by:
linkToEmail
in interfaceHyperlink<HSLFShape,HSLFTextParagraph>
- Parameters:
emailAddress
- the email address
-
linkToUrl
public void linkToUrl(java.lang.String url)
Description copied from interface:Hyperlink
Link to a web page / URL- Specified by:
linkToUrl
in interfaceHyperlink<HSLFShape,HSLFTextParagraph>
- Parameters:
url
- the url
-
linkToSlide
public void linkToSlide(Slide<HSLFShape,HSLFTextParagraph> slide)
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
public java.lang.String 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
public void setAddress(java.lang.String str)
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
public java.lang.String getLabel()
Description copied from interface:Hyperlink
Return text label for this hyperlink
-
setLabel
public void setLabel(java.lang.String label)
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
public static java.util.List<HSLFHyperlink> find(HSLFTextShape shape)
Find hyperlinks in a text shape- Parameters:
shape
-TextRun
to lookup hyperlinks in- Returns:
- found hyperlinks or
null
if not found
-
-