Class BrowserHelpAction

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

    public class BrowserHelpAction
    extends javax.swing.AbstractAction
    Action which invokes help by attempting to display a page from the help document in a web browser.
    Since:
    19 Sep 2008
    Author:
    Mark Taylor
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class javax.swing.AbstractAction

        changeSupport, enabled
      • Fields inherited from interface javax.swing.Action

        ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void actionPerformed​(java.awt.event.ActionEvent evt)  
      static javax.swing.Action createIdAction​(java.lang.String helpId, java.awt.Component parent)
      Returns a new action displaying help for a given help ID.
      static javax.swing.Action createManual1Action​(java.awt.Component parent)
      Returns a new action displaying help for the whole application as a single-page HTML document
      static javax.swing.Action createManualAction​(java.awt.Component parent)
      Returns a new action displaying help for the whole application as a multi-page HTML document
      static java.net.URI getHelpUri​(java.lang.String relUrl)
      Returns an internal URI corresponding to a relative URL (rooted at uk/ac/starlink/topcat/ in the classpath).
      static java.net.URL getHelpUrl​(java.lang.String relUrl)
      Returns an internal URL corresponding to a relative URL (rooted at uk/ac/starlink/topcat/ in the classpath).
      • Methods inherited from class javax.swing.AbstractAction

        addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javax.swing.Action

        accept
    • Method Detail

      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent evt)
      • createIdAction

        public static javax.swing.Action createIdAction​(java.lang.String helpId,
                                                        java.awt.Component parent)
        Returns a new action displaying help for a given help ID.
        Parameters:
        helpId - help ID
        parent - parent window - may be used for positioning
        Returns:
        help action
      • createManualAction

        public static javax.swing.Action createManualAction​(java.awt.Component parent)
        Returns a new action displaying help for the whole application as a multi-page HTML document
        Parameters:
        parent - parent window - may be used for positioning
        Returns:
        help action
      • createManual1Action

        public static javax.swing.Action createManual1Action​(java.awt.Component parent)
        Returns a new action displaying help for the whole application as a single-page HTML document
        Parameters:
        parent - parent window - may be used for positioning
        Returns:
        help action
      • getHelpUrl

        public static java.net.URL getHelpUrl​(java.lang.String relUrl)
        Returns an internal URL corresponding to a relative URL (rooted at uk/ac/starlink/topcat/ in the classpath).
        Parameters:
        relUrl - relative path
        Returns:
        URL, or null in case of problem
      • getHelpUri

        public static java.net.URI getHelpUri​(java.lang.String relUrl)
        Returns an internal URI corresponding to a relative URL (rooted at uk/ac/starlink/topcat/ in the classpath).
        Parameters:
        relUrl - relative path
        Returns:
        URI, or null in case of problem