javax.help

Class TOCView.DefaultTOCFactory

Enclosing Class:
TOCView
Implemented Interfaces:
TreeItemFactory

public static class TOCView.DefaultTOCFactory
extends java.lang.Object
implements TreeItemFactory

A default TreeItemFactory that can be used to parse TOC items as used by this navigator.

Method Summary

TreeItem
createItem()
Creates a default TOCItem.
TreeItem
createItem(String tagName, Hashtable atts, HelpSet hs, Locale locale)
Create an TOCItem with the given data.
Enumeration
listMessages()
Lists all the error messages.
DefaultMutableTreeNode
parsingEnded(DefaultMutableTreeNode node)
Ends parsing.
void
parsingStarted(URL source)
Starts parsing.
void
processDOCTYPE(String root, String publicID, String systemID)
Processes a DOCTYPE.
void
processPI(HelpSet hs, String target, String data)
Finds a PI--ignore it.
void
reportMessage(String msg, boolean validParse)
Reports an error message.

Method Details

createItem

public TreeItem createItem()
Creates a default TOCItem.
Specified by:
createItem in interface TreeItemFactory

createItem

public TreeItem createItem(String tagName,
                           Hashtable atts,
                           HelpSet hs,
                           Locale locale)
Create an TOCItem with the given data.
Specified by:
createItem in interface TreeItemFactory
Parameters:
tagName - The TOC type to create. Valid types are "tocitem". Null or invalid types will throw an IllegalArgumentException
atts - Attributes of the Item. Valid attributes are "target", "image", and "text". A null atts is valid and means no attributes
hs - HelpSet this item was created under.
locale - Locale of this item. A null locale is valid.

listMessages

public Enumeration listMessages()
Lists all the error messages.
Specified by:
listMessages in interface TreeItemFactory

parsingEnded

public DefaultMutableTreeNode parsingEnded(DefaultMutableTreeNode node)
Ends parsing. Last chance to do something to the node.
Specified by:
parsingEnded in interface TreeItemFactory
Parameters:
node - The DefaultMutableTreeNode that has been built during the the parsing. If node is null or there were parsing errors a null is returned.

parsingStarted

public void parsingStarted(URL source)
Starts parsing.
Specified by:
parsingStarted in interface TreeItemFactory

processDOCTYPE

public void processDOCTYPE(String root,
                           String publicID,
                           String systemID)
Processes a DOCTYPE.
Specified by:
processDOCTYPE in interface TreeItemFactory

processPI

public void processPI(HelpSet hs,
                      String target,
                      String data)
Finds a PI--ignore it.
Specified by:
processPI in interface TreeItemFactory

reportMessage

public void reportMessage(String msg,
                          boolean validParse)
Reports an error message.
Specified by:
reportMessage in interface TreeItemFactory