Package javax.help
Class TOCView.DefaultTOCFactory
java.lang.Object
javax.help.TOCView.DefaultTOCFactory
- All Implemented Interfaces:
TreeItemFactory
- Enclosing class:
- TOCView
A default TreeItemFactory that can be used to parse TOC items as used
by this navigator.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a default TOCItem.createItem(String tagName, Hashtable atts, HelpSet hs, Locale locale) Create an TOCItem with the given data.Lists all the error messages.Ends parsing.voidparsingStarted(URL source) Starts parsing.voidprocessDOCTYPE(String root, String publicID, String systemID) Processes a DOCTYPE.voidFinds a PI--ignore it.voidreportMessage(String msg, boolean validParse) Reports an error message.
-
Constructor Details
-
DefaultTOCFactory
public DefaultTOCFactory()
-
-
Method Details
-
parsingStarted
Starts parsing.- Specified by:
parsingStartedin interfaceTreeItemFactory- Parameters:
source- The URL of the document being parsed.
-
processDOCTYPE
Processes a DOCTYPE.- Specified by:
processDOCTYPEin interfaceTreeItemFactory- Parameters:
root- The root tag of the document.publicID- PublicID from the DOCTYPE.systemID- SystemID from the DOCTYPE.
-
processPI
Finds a PI--ignore it.- Specified by:
processPIin interfaceTreeItemFactorytarget- The target of the PI.data- A String for the data in the PI.
-
createItem
Create an TOCItem with the given data.- Specified by:
createItemin interfaceTreeItemFactory- Parameters:
tagName- The TOC type to create. Valid types are "tocitem". Null or invalid types will throw an IllegalArgumentExceptionatts- Attributes of the Item. Valid attributes are "target", "image", and "text". A null atts is valid and means no attributeshs- HelpSet this item was created under.locale- Locale of this item. A null locale is valid.- Returns:
- A TreeItem.
- Throws:
IllegalArgumentExcetpion- if tagname is null or invalid.
-
createItem
Creates a default TOCItem.- Specified by:
createItemin interfaceTreeItemFactory- Returns:
- A TreeItem
-
reportMessage
Reports an error message.- Specified by:
reportMessagein interfaceTreeItemFactory- Parameters:
msg- The message to report.validParse- Whether the result of the parse is still valid.
-
listMessages
Lists all the error messages.- Specified by:
listMessagesin interfaceTreeItemFactory
-
parsingEnded
Ends parsing. Last chance to do something to the node.- Specified by:
parsingEndedin interfaceTreeItemFactory- 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.
-