HTMLEditorKit.ParserCallback

The ParserCallback class is a public inner class inside javax.swing.text.html.HTMLEditorKit.

public static class HTMLEditorKit.ParserCallback extends Object

It has a single public, noargs constructor:

public HTMLEditorKit.ParserCallback()

However, you probably won't use this directly because the standard implementation of this class does nothing. It exists to be subclassed. It has six callback methods that do nothing. You will override these methods to respond to specific items seen in the input stream as the document is parsed.

public void handleText(char[] text, int position)
public void handleComment(char[] text, int position)
public void handleStartTag(HTML.Tag tag, MutableAttributeSet attributes, int position)
public void handleEndTag(HTML.Tag tag, int position)
public void handleSimpleTag(HTML.Tag tag, MutableAttributeSet attributes, int position)
public void handleError(String errorMsg, int position)

There's also a flush() method you use to perform any final cleanup. The parser invokes this method once after it's finished parsing the document.

public void flush() throws BadLocationException


Previous | Next | Top | Cafe au Lait

Copyright 2000 Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified January 23, 2000