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 Object implements Hyperlink<HSLFShape,HSLFTextParagraph>
Represents a hyperlink in a PowerPoint document
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedHSLFHyperlink(ExHyperlink exHyper, InteractiveInfo info)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static List<HSLFHyperlink>find(List<HSLFTextParagraph> paragraphs)Find hyperlinks in a text paragraphprotected static HSLFHyperlinkfind(HSLFShape shape)Find hyperlink assigned to the supplied shapestatic List<HSLFHyperlink>find(HSLFTextShape shape)Find hyperlinks in a text shapeStringgetAddress()intgetEndIndex()Gets the ending character positionExHyperlinkgetExHyperlink()intgetId()InteractiveInfogetInfo()StringgetLabel()intgetStartIndex()Gets the beginning character positionTxInteractiveInfoAtomgetTextRunInfo()HyperlinkTypegetType()Gets the type of the hyperlink action.voidlinkToEmail(String emailAddress)voidlinkToFirstSlide()voidlinkToLastSlide()voidlinkToNextSlide()voidlinkToPreviousSlide()voidlinkToSlide(Slide<HSLFShape,HSLFTextParagraph> slide)voidlinkToUrl(String url)voidsetAddress(String str)voidsetEndIndex(int endIndex)Sets the ending character positionvoidsetLabel(String label)voidsetStartIndex(int startIndex)Sets the beginning character positionprotected voidsetTextRunInfo(TxInteractiveInfoAtom txinfo)
-
-
-
Constructor Detail
-
HSLFHyperlink
protected HSLFHyperlink(ExHyperlink exHyper, InteractiveInfo info)
-
-
Method Detail
-
getExHyperlink
public ExHyperlink getExHyperlink()
-
getInfo
public InteractiveInfo getInfo()
-
getTextRunInfo
public TxInteractiveInfoAtom getTextRunInfo()
-
setTextRunInfo
protected void setTextRunInfo(TxInteractiveInfoAtom txinfo)
-
getType
public HyperlinkType getType()
Gets the type of the hyperlink action. Must be aLINK_*constant- Specified by:
getTypein interfaceHyperlink- Returns:
- the hyperlink URL
- See Also:
InteractiveInfoAtom
-
linkToEmail
public void linkToEmail(String emailAddress)
- Specified by:
linkToEmailin interfaceHyperlink<HSLFShape,HSLFTextParagraph>
-
linkToUrl
public void linkToUrl(String url)
- Specified by:
linkToUrlin interfaceHyperlink<HSLFShape,HSLFTextParagraph>
-
linkToSlide
public void linkToSlide(Slide<HSLFShape,HSLFTextParagraph> slide)
- Specified by:
linkToSlidein interfaceHyperlink<HSLFShape,HSLFTextParagraph>
-
linkToNextSlide
public void linkToNextSlide()
- Specified by:
linkToNextSlidein interfaceHyperlink<HSLFShape,HSLFTextParagraph>
-
linkToPreviousSlide
public void linkToPreviousSlide()
- Specified by:
linkToPreviousSlidein interfaceHyperlink<HSLFShape,HSLFTextParagraph>
-
linkToFirstSlide
public void linkToFirstSlide()
- Specified by:
linkToFirstSlidein interfaceHyperlink<HSLFShape,HSLFTextParagraph>
-
linkToLastSlide
public void linkToLastSlide()
- Specified by:
linkToLastSlidein interfaceHyperlink<HSLFShape,HSLFTextParagraph>
-
getAddress
public String getAddress()
- Specified by:
getAddressin interfaceHyperlink
-
setAddress
public void setAddress(String str)
- Specified by:
setAddressin interfaceHyperlink
-
getId
public int getId()
-
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 List<HSLFHyperlink> find(HSLFTextShape shape)
Find hyperlinks in a text shape- Parameters:
shape-TextRunto lookup hyperlinks in- Returns:
- found hyperlinks or
nullif not found
-
find
protected static List<HSLFHyperlink> find(List<HSLFTextParagraph> paragraphs)
Find hyperlinks in a text paragraph- Parameters:
paragraphs- List ofTextParagraphto lookup hyperlinks- Returns:
- found hyperlinks
-
find
protected static HSLFHyperlink find(HSLFShape shape)
Find hyperlink assigned to the supplied shape- Parameters:
shape-Shapeto lookup hyperlink in- Returns:
- found hyperlink or
null
-
-