com.lightdev.app.shtm
Class SHTMLDocument.SHTMLReader

java.lang.Object
  extended by javax.swing.text.html.HTMLEditorKit.ParserCallback
      extended by javax.swing.text.html.HTMLDocument.HTMLReader
          extended by com.lightdev.app.shtm.SHTMLDocument.SHTMLReader
Enclosing class:
SHTMLDocument

public class SHTMLDocument.SHTMLReader
extends javax.swing.text.html.HTMLDocument.HTMLReader

This reader extends HTMLDocument.HTMLReader by the capability to handle SPAN tags


Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.text.html.HTMLDocument.HTMLReader
javax.swing.text.html.HTMLDocument.HTMLReader.BlockAction, javax.swing.text.html.HTMLDocument.HTMLReader.CharacterAction, javax.swing.text.html.HTMLDocument.HTMLReader.FormAction, javax.swing.text.html.HTMLDocument.HTMLReader.HiddenAction, javax.swing.text.html.HTMLDocument.HTMLReader.IsindexAction, javax.swing.text.html.HTMLDocument.HTMLReader.ParagraphAction, javax.swing.text.html.HTMLDocument.HTMLReader.PreAction, javax.swing.text.html.HTMLDocument.HTMLReader.SpecialAction, javax.swing.text.html.HTMLDocument.HTMLReader.TagAction
 
Field Summary
 
Fields inherited from class javax.swing.text.html.HTMLDocument.HTMLReader
charAttr, parseBuffer
 
Fields inherited from class javax.swing.text.html.HTMLEditorKit.ParserCallback
IMPLIED
 
Constructor Summary
SHTMLDocument.SHTMLReader(int offset)
          Constructor
 
Method Summary
 void handleEndTag(javax.swing.text.html.HTML.Tag t, int pos)
          If a SPAN tag is directed to this method, end its action, otherwise, let HTMLDocument.HTMLReader do the work
 void handleSimpleTag(javax.swing.text.html.HTML.Tag t, javax.swing.text.MutableAttributeSet a, int pos)
          SPAN tags are directed to handleSimpleTag by the parser.
 void handleStartTag(javax.swing.text.html.HTML.Tag t, javax.swing.text.MutableAttributeSet a, int pos)
          handle a start tag received by the parser if it is a SPAN tag, convert the contents of the STYLE attribute to an AttributeSet and add it to the contents of this tag.
 
Methods inherited from class javax.swing.text.html.HTMLDocument.HTMLReader
addContent, addContent, addSpecialElement, blockClose, blockOpen, flush, handleComment, handleEndOfLineString, handleText, popCharacterStyle, preContent, pushCharacterStyle, registerTag, textAreaContent
 
Methods inherited from class javax.swing.text.html.HTMLEditorKit.ParserCallback
handleError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SHTMLDocument.SHTMLReader

public SHTMLDocument.SHTMLReader(int offset)
Constructor

Method Detail

handleStartTag

public void handleStartTag(javax.swing.text.html.HTML.Tag t,
                           javax.swing.text.MutableAttributeSet a,
                           int pos)
handle a start tag received by the parser if it is a SPAN tag, convert the contents of the STYLE attribute to an AttributeSet and add it to the contents of this tag. Otherwise let HTMLDocument.HTMLReader do the work.

Overrides:
handleStartTag in class javax.swing.text.html.HTMLDocument.HTMLReader

handleSimpleTag

public void handleSimpleTag(javax.swing.text.html.HTML.Tag t,
                            javax.swing.text.MutableAttributeSet a,
                            int pos)
SPAN tags are directed to handleSimpleTag by the parser. If a SPAN tag is detected in this method, it gets redirected to handleStartTag and handleEndTag respectively.

Overrides:
handleSimpleTag in class javax.swing.text.html.HTMLDocument.HTMLReader

handleEndTag

public void handleEndTag(javax.swing.text.html.HTML.Tag t,
                         int pos)
If a SPAN tag is directed to this method, end its action, otherwise, let HTMLDocument.HTMLReader do the work

Overrides:
handleEndTag in class javax.swing.text.html.HTMLDocument.HTMLReader