|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcdox.util.doc.Documentation
This class grants easy access to an application's documentation. One has only to write the documentation once in XML format (using the Schema here) and can then use this class to display a help browser or a specific help text. This class is also a command line utility to generate HTML out of the documentation.
You can also use this class to display several documentations in one help browser. For ease of use, one can specify a class to be Documented (using the interface) and provide several of this classes instead of the appropriate Documentations.
Depending on the amount of documentation one can use either one Documentation for the application (and one class implements Documented) or several classes to be Documented. If you use the methods that require several Documented classes as argument, they are displayed as top-level documentation nodes.
Constructor Summary | |
Documentation(javax.swing.JFrame owner,
java.io.File location)
Constructs one using the given file. |
|
Documentation(javax.swing.JFrame owner,
java.io.InputStream in)
Constructs one using the given stream. |
|
Documentation(javax.swing.JFrame owner,
java.lang.String location)
Constructs one using the given file. |
|
Documentation(javax.swing.JFrame owner,
java.net.URL location)
Constructs one using the given URL. |
Method Summary | |
void |
displayDocumentation(java.lang.String language)
Displays all documentation in swing. |
void |
displayDocumentationFor(java.lang.String id,
java.lang.String language)
Displays the requested documentation in swing. |
java.util.HashMap[] |
getCategories(java.lang.String language)
Returns category related information in this documentation in two HashMaps. |
java.lang.String |
getDefaultTopicName()
Returns the default topic id of this documentation. |
org.w3c.dom.Document |
getDocument()
Returns the DOM document for this documentation. |
java.lang.String |
getTitle(java.lang.String language)
Returns the title of this documentation. |
java.lang.String |
getTopic(java.lang.String id,
java.lang.String language)
Returns the requested topic as HTML in the String. |
javax.swing.JEditorPane |
getTopics(java.lang.String language)
Returns a JEditorPane with all the topics in the root of the documentation. |
java.lang.String |
getTopicsAsString(java.lang.String language,
java.lang.String topic)
Returns the requested topic's subtopics as HTML in a string. |
void |
setBackgroundURL(java.net.URL url)
Sets a background image by URL. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Documentation(javax.swing.JFrame owner, java.io.InputStream in) throws java.io.IOException
owner
- a JFrame
value indicating a parent frame.in
- the stream.
java.io.IOException
- if an error occurs.public Documentation(javax.swing.JFrame owner, java.lang.String location) throws java.io.IOException
owner
- a JFrame
value indicating a parent frame.location
- the path to the file.
java.io.IOException
- if an error occurs.public Documentation(javax.swing.JFrame owner, java.net.URL location) throws java.io.IOException
owner
- a JFrame
value indicating a parent frame.location
- the URL.
java.io.IOException
- if an error occurs.public Documentation(javax.swing.JFrame owner, java.io.File location) throws java.io.IOException
owner
- a JFrame
value indicating a parent frame.location
- the file.
java.io.IOException
- if an error occurs.Method Detail |
public org.w3c.dom.Document getDocument()
public void displayDocumentationFor(java.lang.String id, java.lang.String language)
id
- the topic to be displayed.language
- the desired language.public void displayDocumentation(java.lang.String language)
language
- the desired language.public java.lang.String getTitle(java.lang.String language)
language
- the desired language.
public java.lang.String getTopicsAsString(java.lang.String language, java.lang.String topic)
language
- the desired language.topic
- the topic.
public javax.swing.JEditorPane getTopics(java.lang.String language)
language
- the desired language.
public java.lang.String getTopic(java.lang.String id, java.lang.String language)
id
- the topic.language
- the language.
public java.lang.String getDefaultTopicName()
public java.util.HashMap[] getCategories(java.lang.String language)
language
- the language from which the topics are desired.
public void setBackgroundURL(java.net.URL url)
url
- the url. Please note that you can also use jar URLs as defined in
java.net.JarURLConnection.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |