java.lang.Object
gnu.javax.swing.text.html.parser.support.low.Constants
gnu.javax.swing.text.html.parser.support.low.ReaderTokenizer
gnu.javax.swing.text.html.parser.support.Parser
javax.swing.text.html.parser.DocumentParser.gnuParser
- All Implemented Interfaces:
- DTDConstants
- Enclosing class:
- DocumentParser
- private class DocumentParser.gnuParser
- extends gnu.javax.swing.text.html.parser.support.Parser
The enclosed working parser class.
| Fields inherited from class gnu.javax.swing.text.html.parser.support.low.Constants |
AP, bDIGIT, BEGIN, bLETTER, bLINEBREAK, bNAME, bQUOTING, bSINGLE_CHAR_TOKEN, bSPECIAL, bWHITESPACE, COMMENT_END, COMMENT_OPEN, COMMENT_TRIPLEDASH_END, DOUBLE_DASH, END, ENTITY, ENTITY_NAMED, ENTITY_NUMERIC, EOF, EQ, EXCLAMATION, NUMTOKEN, OTHER, QUOT, SCRIPT, SCRIPT_CLOSE, SCRIPT_OPEN, SGML, SLASH, STYLE, STYLE_CLOSE, STYLE_OPEN, TAG, WS |
| Fields inherited from interface javax.swing.text.html.parser.DTDConstants |
ANY, CDATA, CONREF, CURRENT, DEFAULT, EMPTY, ENDTAG, ENTITIES, ENTITY, FIXED, GENERAL, ID, IDREF, IDREFS, IMPLIED, MD, MODEL, MS, NAME, NAMES, NMTOKEN, NMTOKENS, NOTATION, NUMBER, NUMBERS, NUTOKEN, NUTOKENS, PARAMETER, PI, PUBLIC, RCDATA, REQUIRED, SDATA, STARTTAG, SYSTEM |
|
Method Summary |
(package private) DTD |
getDTD()
|
protected void |
handleComment(char[] comment)
Handle HTML comment. |
protected void |
handleEmptyTag(TagElement tag)
Handle the tag with no content, like <br>. |
protected void |
handleEndTag(TagElement tag)
The method is called when the HTML closing tag ((like </table>)
is found or if the parser concludes that the one should be present
in the current position. |
protected void |
handleError(int line,
java.lang.String message)
|
protected void |
handleStartTag(TagElement tag)
The method is called when the HTML opening tag ((like <table>)
is found or if the parser concludes that the one should be present
in the current position. |
protected void |
handleText(char[] text)
Handle the text section. |
| Methods inherited from class gnu.javax.swing.text.html.parser.support.Parser |
_handleText, append, CDATA, Comment, consume, endTag, error, error, error, error, error, flushAttributes, getAttributes, getCurrentLine, handleEOFInComment, handleTitle, makeTag, makeTag, markFirstTime, mustBe, noValueAttribute, optional, parse, parseDocument, parseDTDMarkup, parseMarkupDeclarations, readAttributes, resolveNamedEntity, resolveNumericEntity, restart, Script, Sgml, startTag, Style, Tag |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DocumentParser.gnuParser
private DocumentParser.gnuParser(DTD d)
handleComment
protected final void handleComment(char[] comment)
- Description copied from class:
gnu.javax.swing.text.html.parser.support.Parser
- Handle HTML comment. The default method returns without action.
handleEmptyTag
protected final void handleEmptyTag(TagElement tag)
throws javax.swing.text.ChangedCharSetException
- Description copied from class:
gnu.javax.swing.text.html.parser.support.Parser
- Handle the tag with no content, like <br>. The method is
called for the elements that, in accordance with the current DTD,
has an empty content.
handleEndTag
protected final void handleEndTag(TagElement tag)
- Description copied from class:
gnu.javax.swing.text.html.parser.support.Parser
- The method is called when the HTML closing tag ((like </table>)
is found or if the parser concludes that the one should be present
in the current position.
handleError
protected final void handleError(int line,
java.lang.String message)
handleStartTag
protected final void handleStartTag(TagElement tag)
- Description copied from class:
gnu.javax.swing.text.html.parser.support.Parser
- The method is called when the HTML opening tag ((like <table>)
is found or if the parser concludes that the one should be present
in the current position.
handleText
protected final void handleText(char[] text)
- Description copied from class:
gnu.javax.swing.text.html.parser.support.Parser
- Handle the text section.
For non-preformatted section, the parser replaces
\t, \r and \n by spaces and then multiple spaces
by a single space. Additionaly, all whitespace around
tags is discarded.
For pre-formatted text (inside TEXAREA and PRE), the parser preserves
all tabs and spaces, but removes one bounding \r, \n or \r\n,
if it is present. Additionally, it replaces each occurence of \r or \r\n
by a single \n.
getDTD
DTD getDTD()