Thread.State, Thread.UncaughtExceptionHandler| Modifier and Type | Field and Description | 
|---|---|
| protected KMLViewer.AppFrame | appFrameIndicates the  AppFramethe KML file content is displayed in. | 
| protected Object | kmlSourceIndicates the source of the KML file loaded by this thread. | 
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description | 
|---|
| WorkerThread(Object kmlSource,
            KMLViewer.AppFrame appFrame)Creates a new worker thread from a specified  kmlSourceandappFrame. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected KMLRoot | parse()Parse the KML document. | 
| void | run()Loads this worker thread's KML source into a new  ,
 then adds the newKMLRootto this worker thread'sAppFrame. | 
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldprotected KMLViewer.AppFrame appFrame
AppFrame the KML file content is displayed in. Initialized during construction.protected Object kmlSource
public WorkerThread(Object kmlSource, KMLViewer.AppFrame appFrame)
kmlSource and appFrame.kmlSource - the source of the KML file to load. May be a File, a URL, or an InputStream, or a String identifying a file path or URL.appFrame - the AppFrame in which to display the KML source.protected KMLRoot parse() throws IOException, XMLStreamException
IOException - if the document cannot be read.XMLStreamException - if document cannot be parsed.public void run()
KMLRootKMLRoot to this worker thread's AppFrame. The
 KMLRoot's AVKey.DISPLAY_NAME field contains a display name created from either the
 KML source or the KML root feature name.
 
 If loading the KML source fails, this prints the exception and its stack trace to the standard error stream,
 but otherwise does nothing.