com.lightdev.app.shtm
public class SHTMLDocument extends HTMLDocument
HTMLDocument by a custom reader which supports
the SPAN tag.
| Nested Class Summary | |
|---|---|
| class | SHTMLDocument.SHTMLReader
This reader extends HTMLDocument.HTMLReader by the capability
to handle SPAN tags |
| Field Summary | |
|---|---|
| static String | SUFFIX |
| Constructor Summary | |
|---|---|
| SHTMLDocument()
Constructs an SHTMLDocument. | |
| SHTMLDocument(StyleSheet styles)
Constructs an SHTMLDocument with the default content
storage implementation and the given style/attribute
storage mechanism.
| |
| SHTMLDocument(Content c, StyleSheet styles)
Constructs an SHTMLDocument with the given content
storage implementation and the given style/attribute
storage mechanism.
| |
| Method Summary | |
|---|---|
| void | addAttributes(Element e, AttributeSet a)
apply a set of attributes to a given document element
|
| void | endCompoundEdit() |
| protected void | fireUndoableEditUpdate(UndoableEditEvent e) |
| URL | getBase() |
| String | getDocumentTitle()
get the title of this SHTMLDocument
|
| int | getLastDocumentPosition() |
| Element | getParagraphElement(int pos) |
| Element | getParagraphElement(int pos, boolean noPImplied) Gets the current paragraph element, retracing out of p-implied if the parameter
noImplied is true. |
| ParserCallback | getReader(int pos)
Fetches the reader for the parser to use to load the document
with HTML. |
| String | getStyleRef()
get the style sheet reference of the document in this
DocumentPane.
|
| boolean | hasStyleRef()
check whether or not this SHTMLDocument has an explicit style sheet reference
|
| void | insertAfterEnd(Element elem, String htmlText) |
| void | insertAfterStart(Element elem, String htmlText) |
| void | insertBeforeEnd(Element elem, String htmlText) |
| void | insertBeforeStart(Element elem, String htmlText) |
| void | insertStyleRef()
insert a style sheet reference into the head of this SHTMLDocument |
| void | removeElements(Element element, int index, int count)
Removes a consecutive group of child elements.
|
| void | removeParagraphAttributes(int offset, int length) |
| void | replaceHTML(Element firstElement, int number, String htmlText) |
| void | setBase(URL u) |
| void | setDocumentTitle(String title)
set the title of this SHTMLDocument
|
| void | setOuterHTML(Element paragraphElement, String htmlText) |
| void | setParagraphAttributes(int offset, int length, AttributeSet s, boolean replace) |
| void | startCompoundEdit() |
Parameters: styles the styles
Parameters: c the container for the content styles the styles
Parameters: e the element to apply attributes to a the set of attributes to apply
Returns: the title of this document or null if none was set so far
See Also: javax.swing.text.DefaultStyledDocument#getParagraphElement(int)
DocumentPane.
Returns: the reference to this document's style sheet or null if none is found
Returns: true, if a style sheet reference was found, false if not
Parameters: element the parent element to remove child elements from index the index of the first child element to remove count the number of child elements to remove
Parameters: title the title this document shall have