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.StringgetAddress()Hyperlink address.intgetEndIndex()Gets the ending character positionExHyperlinkgetExHyperlink()intgetId()InteractiveInfogetInfo()java.lang.StringgetLabel()Return text label for this hyperlinkintgetStartIndex()Gets the beginning character positionTxInteractiveInfoAtomgetTextRunInfo()HyperlinkTypegetType()Gets the type of the hyperlink action.HyperlinkTypegetTypeEnum()Deprecated.usegetTypeinsteadvoidlinkToEmail(java.lang.String emailAddress)Link to an emailvoidlinkToFirstSlide()Link to the first slide in this slideshowvoidlinkToLastSlide()Link to the last slide in this slideshowvoidlinkToNextSlide()Link to the next slide (relative from the current)voidlinkToPreviousSlide()Link to the previous slide (relative from the current)voidlinkToSlide(Slide<HSLFShape,HSLFTextParagraph> slide)Link to a slide in this slideshowvoidlinkToUrl(java.lang.String url)Link to a web page / URLvoidsetAddress(java.lang.String str)Hyperlink address.voidsetEndIndex(int endIndex)Sets the ending character positionvoidsetLabel(java.lang.String label)Sets text label for this hyperlinkvoidsetStartIndex(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:
getTypein interfaceHyperlink- Returns:
- the hyperlink URL
- See Also:
InteractiveInfoAtom
-
getTypeEnum
@Deprecated @Removal(version="4.2") public HyperlinkType getTypeEnum()
Deprecated.usegetTypeinsteadGets the type of the hyperlink action. Must be aLINK_*constant- Specified by:
getTypeEnumin interfaceHyperlink- Returns:
- the hyperlink URL
- See Also:
InteractiveInfoAtom
-
linkToEmail
public void linkToEmail(java.lang.String emailAddress)
Description copied from interface:HyperlinkLink to an email- Specified by:
linkToEmailin interfaceHyperlink<HSLFShape,HSLFTextParagraph>- Parameters:
emailAddress- the email address
-
linkToUrl
public void linkToUrl(java.lang.String url)
Description copied from interface:HyperlinkLink to a web page / URL- Specified by:
linkToUrlin interfaceHyperlink<HSLFShape,HSLFTextParagraph>- Parameters:
url- the url
-
linkToSlide
public void linkToSlide(Slide<HSLFShape,HSLFTextParagraph> slide)
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
public java.lang.String 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
public void setAddress(java.lang.String str)
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
public java.lang.String getLabel()
Description copied from interface:HyperlinkReturn text label for this hyperlink
-
setLabel
public void setLabel(java.lang.String label)
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
public static java.util.List<HSLFHyperlink> find(HSLFTextShape shape)
Find hyperlinks in a text shape- Parameters:
shape-TextRunto lookup hyperlinks in- Returns:
- found hyperlinks or
nullif not found
-
-