javax.swing
Class JEditorPane.PageLoader

java.lang.Object
  extended byjava.lang.Thread
      extended byjavax.swing.JEditorPane.PageLoader
All Implemented Interfaces:
Runnable
Enclosing class:
JEditorPane

class JEditorPane.PageLoader
extends Thread

Thread to load a stream into the text document model.


Field Summary
(package private)  Document doc
          The Document instance to load into.
(package private)  InputStream in
          The stream to load the document with
(package private)  URL old
          URL of the old page that was replaced (for the property change event)
(package private)  URL page
          URL of the page being loaded (for the property change event)
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
(package private) JEditorPane.PageLoader(Document doc, InputStream in, int priority, URL old, URL page)
          Construct an asynchronous page loader.
 
Method Summary
 void run()
          Try to load the document, then scroll the view to the reference (if specified).
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

in

InputStream in
The stream to load the document with


old

URL old
URL of the old page that was replaced (for the property change event)


page

URL page
URL of the page being loaded (for the property change event)


doc

Document doc
The Document instance to load into. This is cached in case a new Document is created between the time the thread this is created and run.

Constructor Detail

JEditorPane.PageLoader

JEditorPane.PageLoader(Document doc,
                       InputStream in,
                       int priority,
                       URL old,
                       URL page)
Construct an asynchronous page loader.

Method Detail

run

public void run()
Try to load the document, then scroll the view to the reference (if specified). When done, fire a page property change event.

Specified by:
run in interface Runnable
Overrides:
run in class Thread
See Also:
Thread.start(), Thread.stop(), Thread.Thread(java.lang.ThreadGroup, java.lang.Runnable, java.lang.String), Runnable.run()