Package 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 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
-
-
Constructor Summary
Constructors Constructor Description SHTMLReader(int offset, boolean emptyDocument)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
handleComment(char[] data, int pos)
void
handleEndTag(javax.swing.text.html.HTML.Tag tag, int pos)
Handles end tag.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 tag, javax.swing.text.MutableAttributeSet attributeSet, int pos)
Handles the start tag received by the parser.
-
-
-
Method Detail
-
handleStartTag
public void handleStartTag(javax.swing.text.html.HTML.Tag tag, javax.swing.text.MutableAttributeSet attributeSet, int pos)
Handles the start tag received by the parser. If it is a SPAN tag, converts the contents of the STYLE attribute to an AttributeSet, and adds it to the contents of this tag. Otherwise lets HTMLDocument.HTMLReader do the work.- Overrides:
handleStartTag
in classjavax.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 classjavax.swing.text.html.HTMLDocument.HTMLReader
-
handleEndTag
public void handleEndTag(javax.swing.text.html.HTML.Tag tag, int pos)
Handles end tag. If a SPAN tag is directed to this method, end its action, otherwise, let HTMLDocument.HTMLReader do the work- Overrides:
handleEndTag
in classjavax.swing.text.html.HTMLDocument.HTMLReader
-
handleComment
public void handleComment(char[] data, int pos)
- Overrides:
handleComment
in classjavax.swing.text.html.HTMLDocument.HTMLReader
-
-