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 Details

  • Method Details

    • 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 a LINK_* constant
      Specified by:
      getType in interface Hyperlink
      Returns:
      the hyperlink URL
      See Also:
    • getTypeEnum

      @Deprecated @Removal(version="4.2") public HyperlinkType getTypeEnum()
      Deprecated.
      use getType instead
      Gets the type of the hyperlink action. Must be a LINK_* constant
      Specified by:
      getTypeEnum in interface Hyperlink
      Returns:
      the hyperlink URL
      See Also:
    • linkToEmail

      public void linkToEmail(String emailAddress)
      Description copied from interface: Hyperlink
      Link to an email
      Specified by:
      linkToEmail in interface Hyperlink<HSLFShape,HSLFTextParagraph>
      Parameters:
      emailAddress - the email address
    • linkToUrl

      public void linkToUrl(String url)
      Description copied from interface: Hyperlink
      Link to a web page / URL
      Specified by:
      linkToUrl in interface Hyperlink<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 interface Hyperlink<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 interface Hyperlink<HSLFShape,HSLFTextParagraph>
    • linkToPreviousSlide

      public void linkToPreviousSlide()
      Description copied from interface: Hyperlink
      Link to the previous slide (relative from the current)
      Specified by:
      linkToPreviousSlide in interface Hyperlink<HSLFShape,HSLFTextParagraph>
    • linkToFirstSlide

      public void linkToFirstSlide()
      Description copied from interface: Hyperlink
      Link to the first slide in this slideshow
      Specified by:
      linkToFirstSlide in interface Hyperlink<HSLFShape,HSLFTextParagraph>
    • linkToLastSlide

      public void linkToLastSlide()
      Description copied from interface: Hyperlink
      Link to the last slide in this slideshow
      Specified by:
      linkToLastSlide in interface Hyperlink<HSLFShape,HSLFTextParagraph>
    • getAddress

      public 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 interface Hyperlink
      Returns:
      the address of this hyperlink
    • setAddress

      public void setAddress(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 interface Hyperlink
      Parameters:
      str - the address of this hyperlink
    • getId

      public int getId()
    • getLabel

      public String getLabel()
      Description copied from interface: Hyperlink
      Return text label for this hyperlink
      Specified by:
      getLabel in interface Hyperlink
      Returns:
      text to display
    • setLabel

      public void setLabel(String label)
      Description copied from interface: Hyperlink
      Sets text label for this hyperlink
      Specified by:
      setLabel in interface Hyperlink
      Parameters:
      label - 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 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
    • find

      protected static List<HSLFHyperlink> find(List<HSLFTextParagraph> paragraphs)
      Find hyperlinks in a text paragraph
      Parameters:
      paragraphs - List of TextParagraph to lookup hyperlinks
      Returns:
      found hyperlinks
    • find

      protected static HSLFHyperlink find(HSLFShape shape)
      Find hyperlink assigned to the supplied shape
      Parameters:
      shape - Shape to lookup hyperlink in
      Returns:
      found hyperlink or null