- All Superinterfaces:
TocTree
- All Known Implementing Classes:
HtmlWithTocPane,UrlTocPane
Interface for Table of Contents whose values are URLs.
The methods allows the TOC to be specified via XML files
accessed via input streams or URLs.
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdd an entry.voidAdd an entry.voidsetToc(InputStream is, boolean expand, boolean validating) Set the table of contents from a URL represented as a String.voidSet the table of contents from a URL represented as a String.voidSet the table of contents from a URL.Methods inherited from interface org.bzdev.swing.TocTree
addActionListener, addEntry, clearSelection, clearToc, collapseRow, entriesCompleted, entriesCompleted, expandRow, isCollapsed, isExpanded, nextLevel, prevLevel, removeActionListener, setSelectionWithAction
-
Method Details
-
addEntry
Add an entry. This will define a new TOC entry.- Parameters:
title- A string naming the entry.url- The URL to associate with the entry;- Throws:
MalformedURLException- if the url is malformedIllegalStateException- if this method was called after a call toentriesCompleted.- See Also:
-
addEntry
Add an entry. This will define a new TOC entry.- Parameters:
title- A string naming the entry.url- The URL to associate with the entry;- Throws:
IllegalStateException- if this method was called after a call toentriesCompleted.MalformedURLException- if the url is malformed- See Also:
-
setToc
void setToc(URL url, boolean expand, boolean validating) throws FactoryConfigurationError, SAXException, IOException, ParserConfigurationException, MalformedURLException Set the table of contents from a URL. This method should be used as as an alternative toaddEntry,nextLevel,prevLevelandentriesCompleted- Parameters:
url- the URL containing the table of contents.expand- True if the nodes should be expanded; false otherwisevalidating- True if the parser is validating; false otherwise- Throws:
FactoryConfigurationError- the XML parser cannot be configuredSAXException- the XML data in the input stream in not well formed or is not valid.IOException- an IO error was seenParserConfigurationException- the XML parser cannot be configuredMalformedURLException- if the url is malformed
-
setToc
void setToc(String url, boolean expand, boolean validating) throws FactoryConfigurationError, SAXException, IOException, ParserConfigurationException Set the table of contents from a URL represented as a String. This method should be used as as an alternative toaddEntry,nextLevel,prevLevelandentriesCompleted- Parameters:
url- the URL containing the table of contents.expand- True if the nodes should be expanded; false otherwisevalidating- True if the parser is validating; false otherwise- Throws:
FactoryConfigurationError- the XML parser cannot be configuredSAXException- the XML data in the input stream in not well formed or is not valid.IOException- an IO error was seenParserConfigurationException- the XML parser cannot be configuredMalformedURLException- the string representing the URL was illformed.
-
setToc
void setToc(InputStream is, boolean expand, boolean validating) throws FactoryConfigurationError, SAXException, IOException, ParserConfigurationException Set the table of contents from a URL represented as a String. This method should be used as as an alternative toaddEntry,nextLevel,prevLevelandentriesCompleted- Parameters:
is- the Inputstream containing the table of contents.expand- True if the nodes should be expanded; false otherwisevalidating- True if the parser is validating; false otherwise- Throws:
FactoryConfigurationError- the XML parser cannot be configuredSAXException- the XML data in the input stream in not well formed or is not valid.IOException- an IO error was seenParserConfigurationException- the XML parser cannot be configuredMalformedURLException- the string representing the URL was illformed.
-