javax.help
Class HelpSet.DefaultHelpSetFactory

java.lang.Object
  extended by javax.help.HelpSet.DefaultHelpSetFactory
Enclosing class:
HelpSet

public static class HelpSet.DefaultHelpSetFactory
extends java.lang.Object

The default HelpSetFactory that processes HelpSets.


Nested Class Summary
static class HelpSetFactory.HelpAction
          Internal storage of HelpAction defined in a Presentaion
 
Constructor Summary
HelpSet.DefaultHelpSetFactory()
           
 
Method Summary
 java.util.Enumeration listMessages()
          Enumerates all the error messages.
 HelpSet parsingEnded(HelpSet hs)
          Parsing has ended.
 void parsingStarted(java.net.URL source)
          Parsing starts.
 void processDOCTYPE(java.lang.String root, java.lang.String publicID, java.lang.String systemID)
          Process a DOCTYPE
 void processHomeID(HelpSet hs, java.lang.String value)
          A HomeID is found.
 void processMapRef(HelpSet hs, java.util.Hashtable attributes)
          process a <mapref>
 void processPI(HelpSet hs, java.lang.String target, java.lang.String data)
          Processes a PI
 void processPresentation(HelpSet hs, java.lang.String name, boolean defaultPresentation, boolean displayViews, boolean displayViewImages, java.awt.Dimension size, java.awt.Point location, java.lang.String title, java.lang.String imageID, boolean toolbar, java.util.Vector helpActions)
          Creates a HelpSet.Presentation from the data.
 void processSubHelpSet(HelpSet hs, java.util.Hashtable attributes)
          Called when a sub-HelpSet is found.
 void processTitle(HelpSet hs, java.lang.String value)
          A title is found
 void processView(HelpSet hs, java.lang.String name, java.lang.String label, java.lang.String type, java.util.Hashtable viewAttributes, java.lang.String data, java.util.Hashtable dataAttributes, java.util.Locale locale)
          Creates a NavigatorView from the data.
 void reportMessage(java.lang.String msg, boolean validParse)
          Reports an error message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HelpSet.DefaultHelpSetFactory

public HelpSet.DefaultHelpSetFactory()
Method Detail

parsingStarted

public void parsingStarted(java.net.URL source)
Parsing starts.


processDOCTYPE

public void processDOCTYPE(java.lang.String root,
                           java.lang.String publicID,
                           java.lang.String systemID)
Process a DOCTYPE

Parameters:
publicID - the document. If null or is not valid a parsingError will be generated.
root - The root tag of the document
systemID - SystemID from the DOCTYPE

processPI

public void processPI(HelpSet hs,
                      java.lang.String target,
                      java.lang.String data)
Processes a PI

target - The target of the PI
data - A String for the data in the PI

processTitle

public void processTitle(HelpSet hs,
                         java.lang.String value)
A title is found

Parameters:
hs - The Helpset
value - The title of the HelpSet

processHomeID

public void processHomeID(HelpSet hs,
                          java.lang.String value)
A HomeID is found.

Parameters:
hs - The Helpset
value - The home ID for the helpset

processMapRef

public void processMapRef(HelpSet hs,
                          java.util.Hashtable attributes)
process a <mapref>

Parameters:
Spec - to the URL
Attributes - for the tag

processView

public void processView(HelpSet hs,
                        java.lang.String name,
                        java.lang.String label,
                        java.lang.String type,
                        java.util.Hashtable viewAttributes,
                        java.lang.String data,
                        java.util.Hashtable dataAttributes,
                        java.util.Locale locale)
Creates a NavigatorView from the data.

Parameters:
hs - The HelpSet

processPresentation

public void processPresentation(HelpSet hs,
                                java.lang.String name,
                                boolean defaultPresentation,
                                boolean displayViews,
                                boolean displayViewImages,
                                java.awt.Dimension size,
                                java.awt.Point location,
                                java.lang.String title,
                                java.lang.String imageID,
                                boolean toolbar,
                                java.util.Vector helpActions)
Creates a HelpSet.Presentation from the data. The hs and name parameters are the only required parameters. All others may be null.

Parameters:
hs - The HelpSet
name - Name of the Presentation
displayViews - Display the Views in the Presentation
displayViewImages - Display the Views Images in the Presentation
size - Size of the Presentation
location - Location of the Presentation
title - Title for the presentation
toolbar - Is there a custom toolbar for the presentation
helpActions - A Vector of HelpAction(s).

processSubHelpSet

public void processSubHelpSet(HelpSet hs,
                              java.util.Hashtable attributes)
Called when a sub-HelpSet is found.


reportMessage

public void reportMessage(java.lang.String msg,
                          boolean validParse)
Reports an error message.

Parameters:
msg - The message to report.
validParse - Whether the on-going parse should return a valid object.

listMessages

public java.util.Enumeration listMessages()
Enumerates all the error messages.


parsingEnded

public HelpSet parsingEnded(HelpSet hs)
Parsing has ended. Last chance to do something to the HelpSet.

Parameters:
hs - The HelpSet the parsing ended on. A null hs is valid.