Class javax.help.IndexView.DefaultIndexFactory
java.lang.Object
|
+----javax.help.IndexView.DefaultIndexFactory
- public static class IndexView.DefaultIndexFactory
- extends java.lang.Object
- implements TreeItemFactory
A default TreeItemFactory that can be used to parse TOC items as used
by this navigator.
IndexView.DefaultIndexFactory
public IndexView.DefaultIndexFactory()
parsingStarted
public void parsingStarted(java.net.URL source)
- Parsing has started
- Implements:
- parsingStarted in interface TreeItemFactory
processDOCTYPE
public void processDOCTYPE(java.lang.String root,
java.lang.String publicID,
java.lang.String systemID)
- Process a DOCTYPE
- Implements:
- processDOCTYPE in interface TreeItemFactory
processPI
public void processPI(HelpSet hs,
java.lang.String target,
java.lang.String data)
- We have found a PI; ignore it
- Implements:
- processPI in interface TreeItemFactory
createItem
public TreeItem createItem(java.lang.String tagName,
java.util.Hashtable atts,
HelpSet hs,
java.util.Locale locale)
- Creates an IndexItem with the given data.
- Implements:
- createItem in interface TreeItemFactory
- Parameters:
tagName
- The index type to create.
Valid types are "indexitem". Null or invalid types throw an
IllegalArgumentException.
atts
- Attributes of the Item. Valid attributes are "target"
and "text". A null atts is valid and means no attributes.
hs
- The HelpSet this item was created under.
locale
- Locale of this item. A null locale is valid.
- Throws:
- java.lang.IllegalArgumentException - if tagname is null or invalid.
createItem
public TreeItem createItem()
- Creates a default IndexItem.
- Implements:
- createItem in interface TreeItemFactory
reportMessage
public void reportMessage(java.lang.String msg,
boolean validParse)
- Reports an error message.
- Implements:
- reportMessage in interface TreeItemFactory
listMessages
public java.util.Enumeration listMessages()
- Lists all the error messages.
- Implements:
- listMessages in interface TreeItemFactory
parsingEnded
public javax.swing.tree.DefaultMutableTreeNode parsingEnded(javax.swing.tree.DefaultMutableTreeNode node)
- Parsing has ended. The last chance to do something
to the node
- Implements:
- 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.