uk.ac.starlink.topcat
Class BrowserHelpAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by uk.ac.starlink.topcat.BrowserHelpAction
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action

public class BrowserHelpAction
extends 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
 void actionPerformed(ActionEvent evt)
           
static Action createIdAction(String helpId, Component parent)
          Returns a new action displaying help for a given help ID.
static Action createManual1Action(Component parent)
          Returns a new action displaying help for the whole application as a single-page HTML document
static Action createManualAction(Component parent)
          Returns a new action displaying help for the whole application as a multi-page HTML document
static URI getHelpUri(String relUrl)
          Returns an internal URI corresponding to a relative URL (rooted at uk/ac/starlink/topcat/ in the classpath).
static URL getHelpUrl(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
 

Method Detail

actionPerformed

public void actionPerformed(ActionEvent evt)

createIdAction

public static Action createIdAction(String helpId,
                                    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 Action createManualAction(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 Action createManual1Action(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 URL getHelpUrl(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 URI getHelpUri(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


Copyright © 2003-2018 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.