com.lightdev.app.shtm
Class SHTMLDocument.SHTMLReader
java.lang.Object
javax.swing.text.html.HTMLEditorKit.ParserCallback
javax.swing.text.html.HTMLDocument.HTMLReader
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 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 |
Fields inherited from class javax.swing.text.html.HTMLDocument.HTMLReader |
charAttr, parseBuffer |
Fields inherited from class javax.swing.text.html.HTMLEditorKit.ParserCallback |
IMPLIED |
Method Summary |
void |
handleComment(char[] data,
int pos)
|
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. |
void |
handleText(char[] data,
int pos)
|
Methods inherited from class javax.swing.text.html.HTMLDocument.HTMLReader |
addContent, addContent, addSpecialElement, blockClose, blockOpen, flush, handleEndOfLineString, 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 |
SHTMLDocument.SHTMLReader
public SHTMLDocument.SHTMLReader(int offset,
boolean emptyDocument)
- Constructor
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
handleComment
public void handleComment(char[] data,
int pos)
- Overrides:
handleComment
in class javax.swing.text.html.HTMLDocument.HTMLReader
handleText
public void handleText(char[] data,
int pos)
- Overrides:
handleText
in class javax.swing.text.html.HTMLDocument.HTMLReader