javax.help
Interface TreeItemFactory
- FavoritesView.DefaultFavoritesFactory, IndexView.DefaultIndexFactory, TOCView.DefaultTOCFactory
public interface TreeItemFactory
A factory for creating TreeItems. This can be used to reuse the parsers.
createItem
public TreeItem createItem()
Creates a default TreeItem.
createItem
public TreeItem createItem(String tagName,
Hashtable attributes,
HelpSet hs,
Locale locale)
Creates a TreeItem from the given data.
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.
listMessages
public Enumeration listMessages()
Lists all the error messages.
parsingEnded
public DefaultMutableTreeNode parsingEnded(DefaultMutableTreeNode node)
Ends parsing. Last chance to do something
to the node. Return null to be sure the result is discarded.
parsingStarted
public void parsingStarted(URL source)
Starts parsing.
source
- The URL of the document being parsed.
processDOCTYPE
public void processDOCTYPE(String root,
String publicID,
String systemID)
Processes a DOCTYPE.
root
- The root tag of the document.publicID
- PublicID from the DOCTYPE.systemID
- SystemID from the DOCTYPE.
processPI
public void processPI(HelpSet hs,
String target,
String data)
A Processing Instruction.
target
- The target of the PI.data
- A String for the data in the PI.
reportMessage
public void reportMessage(String msg,
boolean validParse)
Reports a parsing error.
msg
- The message to report.validParse
- Whether the result of the parse is still valid.