javax.swing.text.html
类 HTMLEditorKit.ParserCallback

java.lang.Object
  继承者 javax.swing.text.html.HTMLEditorKit.ParserCallback
直接已知子类:
HTMLDocument.HTMLReader
正在封闭类:
HTMLEditorKit

public static class HTMLEditorKit.ParserCallback
   
   
   
extends Object

解析结果驱动这些回调方法。打开和关闭动作应该是对称的。flush 方法将是最后一个调用的方法,以便接收者有机会将任何挂起的数据刷新到文档中。

有关 AttributeSets 的内容、位置和其他信息,请参考 DocumentParser,它是所使用的默认解析器。

另请参见:
DocumentParser

字段摘要
static ObjectIMPLIED
          这是作为属性集中的一个属性来传递的,用来指示元素是隐含的,例如字符串 '<>foo<\t>' 包含隐含的 html 元素和隐含的正文元素。
 
构造方法摘要
HTMLEditorKit.ParserCallback()
           
 
方法摘要
 voidflush()
           
 voidhandleComment(char[] data, int pos)
           
 voidhandleEndOfLineString(String eol)
          它的调用是在完成流的解析之后且在调用 flush 之前。
 voidhandleEndTag(HTML.Tag t, int pos)
           
 voidhandleError(String errorMsg, int pos)
           
 voidhandleSimpleTag(HTML.Tag t, MutableAttributeSet a, int pos)
           
 voidhandleStartTag(HTML.Tag t, MutableAttributeSet a, int pos)
           
 voidhandleText(char[] data, int pos)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

IMPLIED

public static final Object IMPLIED
这是作为属性集中的一个属性来传递的,用来指示元素是隐含的,例如字符串 '<>foo<\t>' 包含隐含的 html 元素和隐含的正文元素。

从以下版本开始:
1.3
构造方法详细信息

HTMLEditorKit.ParserCallback

public HTMLEditorKit.ParserCallback()
方法详细信息

flush

public void flush()
           throws BadLocationException
抛出:
BadLocationException

handleText

public void handleText(char[] data,
                       int pos)

handleComment

public void handleComment(char[] data,
                          int pos)

handleStartTag

public void handleStartTag(HTML.Tag t,
                           MutableAttributeSet a,
                           int pos)

handleEndTag

public void handleEndTag(HTML.Tag t,
                         int pos)

handleSimpleTag

public void handleSimpleTag(HTML.Tag t,
                            MutableAttributeSet a,
                            int pos)