|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.batik.util.DocumentLoadRunnable
This class implements a document loading thread "runnable", allowing background loading of documents, and asynchronous notification of DocumentEvents.
Field Summary | |
protected SVGDocumentFactory |
df
The SVG document factory to use when creating SVG Documents. |
protected java.lang.String |
documentURI
The document URI. |
protected java.util.Vector |
listeners
The DocumentEventListener list. |
Constructor Summary | |
DocumentLoadRunnable(java.lang.String uri)
Create a new DocumentLoadRunnable for a given URI. |
Method Summary | |
void |
addDocumentListener(DocumentListener l)
Associate a DocumentEventListener with this loader. |
static java.lang.Thread |
createLoaderThread(java.lang.String uri,
DocumentListener l,
SVGDocumentFactory df)
Creates a new thread which runs a new DocumentLoader runnable. |
void |
fireAsyncDocumentEvent(DocumentEvent e,
boolean wait)
Fire a document event to all listeners. |
SVGDocumentFactory |
getDocumentFactory()
Return the associated SVGDocumentFactory for this loader. |
void |
removeDocumentListener(DocumentListener l)
Remove a DocumentEventListener from this loader's listener list. |
void |
run()
The main Runnable method. |
void |
setDocumentFactory(SVGDocumentFactory df)
Associate an SVGDocumentFactory with this loader. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String documentURI
protected SVGDocumentFactory df
protected java.util.Vector listeners
Constructor Detail |
public DocumentLoadRunnable(java.lang.String uri)
uri
- a String representing the document's URI.Method Detail |
public static java.lang.Thread createLoaderThread(java.lang.String uri, DocumentListener l, SVGDocumentFactory df)
uri
- a String representing the document's URI.df
- the SVGDocumentFactory for creating the documentl
- a DocumentListener which should listen to this loader's events.public void addDocumentListener(DocumentListener l)
addDocumentListener
in interface DocumentEventSource
public void removeDocumentListener(DocumentListener l)
removeDocumentListener
in interface DocumentEventSource
public void setDocumentFactory(SVGDocumentFactory df)
public SVGDocumentFactory getDocumentFactory()
public void fireAsyncDocumentEvent(DocumentEvent e, boolean wait)
fireAsyncDocumentEvent
in interface DocumentEventSource
e
- the DocumentEvent to be asynchronously delivered.wait
- a boolean indicating whether we should wait for deliverypublic void run()
run
in interface java.lang.Runnable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |