Class HyperlinkHandler

  • All Implemented Interfaces:
    java.util.EventListener, javax.swing.event.HyperlinkListener

    public class HyperlinkHandler
    extends java.lang.Object
    implements javax.swing.event.HyperlinkListener
    Handles clicks on hyperlinks inside HelpBrowser.
    Since:
    14807
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.String getUrlFragment​(javax.swing.event.HyperlinkEvent e)
      Checks whether the hyperlink event originated on a <a ...> element with a relative href consisting of a URL fragment only, i.e.
      void hyperlinkUpdate​(javax.swing.event.HyperlinkEvent e)  
      protected boolean scrollToElementWithId​(java.lang.String id)
      Scrolls the help browser to the element with id id
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • scrollToElementWithId

        protected boolean scrollToElementWithId​(java.lang.String id)
        Scrolls the help browser to the element with id id
        Parameters:
        id - the id
        Returns:
        true, if an element with this id was found and scrolling was successful; false, otherwise
      • getUrlFragment

        protected java.lang.String getUrlFragment​(javax.swing.event.HyperlinkEvent e)
        Checks whether the hyperlink event originated on a <a ...> element with a relative href consisting of a URL fragment only, i.e. <a href="#thisIsALocalFragment">. If so, replies the fragment, i.e. "thisIsALocalFragment". Otherwise, replies null
        Parameters:
        e - the hyperlink event
        Returns:
        the local fragment or null
      • hyperlinkUpdate

        public void hyperlinkUpdate​(javax.swing.event.HyperlinkEvent e)
        Specified by:
        hyperlinkUpdate in interface javax.swing.event.HyperlinkListener