PamView
Class PamHelp

java.lang.Object
  extended by PamView.PamHelp

public class PamHelp
extends java.lang.Object

Author:
David McLaren, Paul Redmond Doug Gillespie

Nested Class Summary
(package private)  class PamHelp.MyHelpModelListener
           
 
Field Summary
private  javax.swing.JButton backButton
           
private  javax.swing.JPanel buttonBar
           
private  java.util.ArrayList<java.awt.Component> componentList
           
private  java.lang.String currentID
           
private  java.lang.String defaultId
           
private  java.lang.String defaultMixedId
           
private  java.lang.String defaultViewerId
           
private  javax.help.DefaultHelpBroker defHb
           
private  javax.swing.JButton forwardButton
           
private  javax.swing.JTabbedPane help_pane
          Holder for toc, index and search tabs
private  javax.swing.JFrame helpFrame
          Main frame
private  javax.help.HelpSet hs
           
private  int idIndex
           
private  javax.swing.JPanel index
           
private  javax.help.JHelpIndexNavigator navIndex
           
private  javax.help.JHelpSearchNavigator navSearch
           
private  javax.help.JHelpTOCNavigator navTOC
           
private  java.util.ArrayList<java.lang.String> pageHistory
           
private  boolean registerIdChange
           
private  javax.swing.JPanel search
           
private static PamHelp singleInstance
           
private  javax.swing.JSplitPane splitPane
          Holds main content pane on right and tabbed pane (help_pane) on left.
private  javax.swing.JPanel toc
           
private  javax.help.plaf.basic.BasicTOCNavigatorUI tocNav
           
private  javax.help.JHelpContentViewer viewer
           
 
Constructor Summary
private PamHelp()
           
 
Method Summary
private  boolean addHelpSet(java.lang.String helpsetName)
          Add a module helpset to the master help
private  void buildMasterHelpset()
          Called from constructor to create the panels for the help frame.
private  void checkButtonStates()
           
 void createFrameAndWindows()
          Adds the right components to the main frame.
 void createHelpSet()
          Create the master HelpSet object from the help/PAMGUARD.hs file.
 void displayContextSensitiveHelp(java.lang.String helpTarget)
           
 void displayHelp()
           
private  java.lang.String getDefaultId()
           
static PamHelp getInstance()
           
private  boolean linkHelpToWindows()
           
private  boolean setCurrentID(java.lang.String id)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

componentList

private java.util.ArrayList<java.awt.Component> componentList

hs

private javax.help.HelpSet hs

viewer

private javax.help.JHelpContentViewer viewer

navSearch

private javax.help.JHelpSearchNavigator navSearch

navTOC

private javax.help.JHelpTOCNavigator navTOC

navIndex

private javax.help.JHelpIndexNavigator navIndex

currentID

private java.lang.String currentID

backButton

private javax.swing.JButton backButton

forwardButton

private javax.swing.JButton forwardButton

defHb

private javax.help.DefaultHelpBroker defHb

tocNav

private javax.help.plaf.basic.BasicTOCNavigatorUI tocNav

idIndex

private int idIndex

pageHistory

private java.util.ArrayList<java.lang.String> pageHistory

registerIdChange

private boolean registerIdChange

splitPane

private javax.swing.JSplitPane splitPane
Holds main content pane on right and tabbed pane (help_pane) on left.


help_pane

private javax.swing.JTabbedPane help_pane
Holder for toc, index and search tabs


helpFrame

private javax.swing.JFrame helpFrame
Main frame


search

private javax.swing.JPanel search

index

private javax.swing.JPanel index

toc

private javax.swing.JPanel toc

buttonBar

private javax.swing.JPanel buttonBar

defaultId

private final java.lang.String defaultId
See Also:
Constant Field Values

defaultViewerId

private final java.lang.String defaultViewerId
See Also:
Constant Field Values

defaultMixedId

private final java.lang.String defaultMixedId
See Also:
Constant Field Values

singleInstance

private static PamHelp singleInstance
Constructor Detail

PamHelp

private PamHelp()
Method Detail

getDefaultId

private java.lang.String getDefaultId()

checkButtonStates

private void checkButtonStates()

buildMasterHelpset

private void buildMasterHelpset()
Called from constructor to create the panels for the help frame.


createFrameAndWindows

public void createFrameAndWindows()
Adds the right components to the main frame.


displayHelp

public void displayHelp()

displayContextSensitiveHelp

public void displayContextSensitiveHelp(java.lang.String helpTarget)

getInstance

public static PamHelp getInstance()

createHelpSet

public void createHelpSet()
Create the master HelpSet object from the help/PAMGUARD.hs file.

Then optionally merge in helpsets from other modules (since Feb 2009, this is little used with most help sets being combined into a single hs so that indexing and searching work and so that a more sensible layout of modules within the TOC can be acheived.


addHelpSet

private boolean addHelpSet(java.lang.String helpsetName)
Add a module helpset to the master help

Parameters:
helpsetName -
Returns:
true if successful.

linkHelpToWindows

private boolean linkHelpToWindows()

setCurrentID

private boolean setCurrentID(java.lang.String id)