Interface javax.help.TreeItemFactory

Implementing Classes:
TOCView.DefaultTOCFactory, IndexView.DefaultIndexFactory, FavoritesView.DefaultFavoritesFactory

public interface TreeItemFactory
A factory for creating TreeItems. This can be used to reuse the parsers.


parsingStarted

public void parsingStarted(java.net.URL source)
Starts parsing.
Parameters:
source - The URL of the document being parsed.

processDOCTYPE

public void processDOCTYPE(java.lang.String root,
                           java.lang.String publicID,
                           java.lang.String systemID)
Processes a DOCTYPE.
Parameters:
root - The root tag of the document.
publicID - PublicID from the DOCTYPE.
systemID - SystemID from the DOCTYPE.

processPI

public void processPI(HelpSet hs,
                      java.lang.String target,
                      java.lang.String data)
A Processing Instruction.
Parameters:
target - The target of the PI.
data - A String for the data in the PI.

createItem

public TreeItem createItem(java.lang.String tagName,
                           java.util.Hashtable attributes,
                           HelpSet hs,
                           java.util.Locale locale)
Creates a TreeItem from the given data.
Parameters:
tagName - The name of the tag (for example, treeItem, or tocItem)
attributes - A hashtable with all the attributes. Null is a valid value.
hs - A HelpSet that provides context.
lang - The locale.
Returns:
A TreeItem.

createItem

public TreeItem createItem()
Creates a default TreeItem.
Returns:
A TreeItem

reportMessage

public void reportMessage(java.lang.String msg,
                          boolean validParse)
Reports a parsing error.
Parameters:
msg - The message to report.
validParse - Whether the result of the parse is still valid.

listMessages

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

parsingEnded

public javax.swing.tree.DefaultMutableTreeNode parsingEnded(javax.swing.tree.DefaultMutableTreeNode node)
Ends parsing. Last chance to do something to the node. Return null to be sure the result is discarded.