org.openstreetmap.josm.gui.help
Class HelpBrowser.HyperlinkHandler

java.lang.Object
  extended by org.openstreetmap.josm.gui.help.HelpBrowser.HyperlinkHandler
All Implemented Interfaces:
java.util.EventListener, javax.swing.event.HyperlinkListener
Enclosing class:
HelpBrowser

 class HelpBrowser.HyperlinkHandler
extends java.lang.Object
implements javax.swing.event.HyperlinkListener


Constructor Summary
HelpBrowser.HyperlinkHandler()
           
 
Method Summary
protected  java.lang.String getUrlFragment(javax.swing.event.HyperlinkEvent e)
          Checks whether the hyperlink event originated on 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
 

Constructor Detail

HelpBrowser.HyperlinkHandler

HelpBrowser.HyperlinkHandler()
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 element with a relative href consisting of a URL fragment only, i.e. . If so, replies the fragment, i.e. "thisIsALocalFragment". Otherwise, replies null

Parameters:
e - the hyperlink event
Returns:
the local fragment

hyperlinkUpdate

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


JOSM