Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

javax.swing.text.html.parser
Class ParserDelegator.gnuParser  view ParserDelegator.gnuParser download ParserDelegator.gnuParser.java

java.lang.Object
  extended bygnu.javax.swing.text.html.parser.support.low.Constants
      extended bygnu.javax.swing.text.html.parser.support.low.ReaderTokenizer
          extended bygnu.javax.swing.text.html.parser.support.Parser
              extended byjavax.swing.text.html.parser.ParserDelegator.gnuParser
All Implemented Interfaces:
DTDConstants
Enclosing class:
ParserDelegator

private class ParserDelegator.gnuParser
extends gnu.javax.swing.text.html.parser.support.Parser


Field Summary
private static long serialVersionUID
           
 
Fields inherited from class gnu.javax.swing.text.html.parser.support.Parser
dtd, hTag, preformatted, strict
 
Fields inherited from class gnu.javax.swing.text.html.parser.support.low.ReaderTokenizer
advanced, backupMode
 
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
 
Constructor Summary
private ParserDelegator.gnuParser(DTD d)
           
 
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 gnu.javax.swing.text.html.parser.support.low.ReaderTokenizer
getEndOfLineSequence, getNextToken, getTokenAhead, getTokenAhead, mark, reset, reset
 
Methods inherited from class gnu.javax.swing.text.html.parser.support.low.Constants
endMatches
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

ParserDelegator.gnuParser

private ParserDelegator.gnuParser(DTD d)
Method Detail

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()