|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.text.html.HTMLEditorKit.ParserCallback
xml.HtmlReferences.HrefCallback
private static final class HtmlReferences.HrefCallback
A helper callback class that scans for href attributes in anchors.
| Field Summary | |
|---|---|
private URL |
base
The base of the URL document. |
private List<URL> |
ref
All references found, resolved against the base URL. |
| Fields inherited from class javax.swing.text.html.HTMLEditorKit.ParserCallback |
|---|
IMPLIED |
| Constructor Summary | |
|---|---|
private |
HtmlReferences.HrefCallback(URL from)
Constructs a new callback that only listens to 'a' tags. |
| Method Summary | |
|---|---|
List<URL> |
getAllReferences()
Returns all references found. |
void |
handleStartTag(HTML.Tag tag,
MutableAttributeSet mas,
int p)
If the tag encountered is a HTML.Tag.A tag and has an
attribute named 'href' attached to it, we construct a new url from it
and store it in our list. |
| Methods inherited from class javax.swing.text.html.HTMLEditorKit.ParserCallback |
|---|
flush, handleComment, handleEndOfLineString, handleEndTag, handleError, handleSimpleTag, handleText |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private URL base
private List<URL> ref
| Constructor Detail |
|---|
private HtmlReferences.HrefCallback(URL from)
| Method Detail |
|---|
public void handleStartTag(HTML.Tag tag,
MutableAttributeSet mas,
int p)
HTML.Tag.A tag and has an
attribute named 'href' attached to it, we construct a new url from it
and store it in our list.
handleStartTag in class HTMLEditorKit.ParserCallbackpublic List<URL> getAllReferences()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||