TreeItemFactory
public static class FavoritesView.DefaultFavoritesFactory extends java.lang.Object implements TreeItemFactory
Constructor | Description |
---|---|
DefaultFavoritesFactory() |
Modifier and Type | Method | Description |
---|---|---|
TreeItem |
createItem() |
Creates a default FavoritesItem.
|
TreeItem |
createItem(java.lang.String tagName,
java.util.Hashtable atts,
HelpSet hs,
java.util.Locale locale) |
Creates an FavoritesItem with the given data.
|
java.util.Enumeration |
listMessages() |
Lists all the error messages.
|
javax.swing.tree.DefaultMutableTreeNode |
parsingEnded(javax.swing.tree.DefaultMutableTreeNode node) |
Parsing has ended.
|
void |
parsingStarted(java.net.URL source) |
Parsing has started
|
void |
processDOCTYPE(java.lang.String root,
java.lang.String publicID,
java.lang.String systemID) |
Process a DOCTYPE
|
void |
processPI(HelpSet hs,
java.lang.String target,
java.lang.String data) |
We have found a PI; ignore it
|
void |
reportMessage(java.lang.String msg,
boolean validParse) |
Reports an error message.
|
public void parsingStarted(java.net.URL source)
parsingStarted
in interface TreeItemFactory
source
- The URL of the document being parsed.public void processDOCTYPE(java.lang.String root, java.lang.String publicID, java.lang.String systemID)
processDOCTYPE
in interface TreeItemFactory
root
- The root tag of the document.publicID
- PublicID from the DOCTYPE.systemID
- SystemID from the DOCTYPE.public void processPI(HelpSet hs, java.lang.String target, java.lang.String data)
processPI
in interface TreeItemFactory
target
- The target of the PI.data
- A String for the data in the PI.public TreeItem createItem(java.lang.String tagName, java.util.Hashtable atts, HelpSet hs, java.util.Locale locale)
createItem
in interface TreeItemFactory
tagName
- The favorites type to create.
Valid types are "favoriteitem". 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.java.lang.IllegalArgumentException
- if tagname is null or invalid.public TreeItem createItem()
createItem
in interface TreeItemFactory
public void reportMessage(java.lang.String msg, boolean validParse)
reportMessage
in interface TreeItemFactory
msg
- The message to report.validParse
- Whether the result of the parse is still valid.public java.util.Enumeration listMessages()
listMessages
in interface TreeItemFactory
public javax.swing.tree.DefaultMutableTreeNode parsingEnded(javax.swing.tree.DefaultMutableTreeNode node)
parsingEnded
in interface TreeItemFactory
node
- The DefaultMutableTreeNode that has been built during the
the parsing. If node is null or there were parsing errors a null
is returned.