|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.text.html.HTMLEditorKit.ParserCallback
public static class HTMLEditorKit.ParserCallback
The "hook" that receives all information about the HTML document structure while parsing it. The methods are invoked by parser and should be normally overridden.
| Field Summary | |
|---|---|
static Object |
IMPLIED
If the tag does not occurs in the html stream directly, but is supposed by parser, the tag attribute set contains this additional attribute, having value Boolean.True. |
| Constructor Summary | |
|---|---|
HTMLEditorKit.ParserCallback()
Constructor |
|
| Method Summary | |
|---|---|
void |
flush()
The parser calls this method after it finishes parsing the document. |
void |
handleComment(char[] comment,
int position)
Handle HTML comment, present in the given position. |
void |
handleEndOfLineString(String end_of_line)
Notifies about the character sequences, used to separate lines in this document. |
void |
handleEndTag(HTML.Tag tag,
int position)
The method is called when the HTML closing tag ((like </table>) is found or if the parser concludes that the one should be present in the current position. |
void |
handleError(String message,
int position)
Handle the error. |
void |
handleSimpleTag(HTML.Tag tag,
MutableAttributeSet attributes,
int position)
Handle the tag with no content, like <br>. |
void |
handleStartTag(HTML.Tag tag,
MutableAttributeSet attributes,
int position)
The method is called when the HTML opening tag ((like <table>) is found or if the parser concludes that the one should be present in the current position. |
void |
handleText(char[] text,
int position)
Handle the text section. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Object IMPLIED
| Constructor Detail |
|---|
public HTMLEditorKit.ParserCallback()
| Method Detail |
|---|
public void flush()
throws BadLocationException
BadLocationException
public void handleComment(char[] comment,
int position)
comment - the commentpublic void handleEndOfLineString(String end_of_line)
end_of_line - The "end of line sequence", one of: \r or \n or \r\n.
public void handleEndTag(HTML.Tag tag,
int position)
tag - The tag being handledposition - the tag position in the text being parsed.
public void handleError(String message,
int position)
message - The message, explaining the error.position - The starting position of the fragment that has caused
the error in the html document being parsed.
public void handleSimpleTag(HTML.Tag tag,
MutableAttributeSet attributes,
int position)
tag - The tag being handled.position - The tag position in the text being parsed.
public void handleStartTag(HTML.Tag tag,
MutableAttributeSet attributes,
int position)
tag - The tag being handledposition - The tag position in the text being parsed
public void handleText(char[] text,
int position)
text - A section text.position - The text position in the HTML document text being parsed.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||