jwo.landserf.process
Class OpenThread

java.lang.Object
  extended byjava.lang.Thread
      extended byjwo.landserf.process.LSThread
          extended byjwo.landserf.process.OpenThread
All Implemented Interfaces:
JWInterruptionListener, Runnable

public class OpenThread
extends LSThread

Opens a spatial file and places contents into a spatial object.

Version:
2.2, 6th March, 2004.
Author:
Jo Wood

Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
OpenThread(GISFrame gisFrame, File[] inFiles)
          Attempts to open the relevant spatial object file(s).
OpenThread(GISFrame gisFrame, File[] inFiles, int fileType, int position)
          Opens the relevant spatial object file(s).
 
Method Summary
 void doProcessing()
          Opens the spatial object file(s) requested.
 
Methods inherited from class jwo.landserf.process.LSThread
checkStoppedThread, interruptionRequested, resetTimer, run, setErrorMessage, setMessage
 
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
 

Constructor Detail

OpenThread

public OpenThread(GISFrame gisFrame,
                  File[] inFiles)
Attempts to open the relevant spatial object file(s). Guesses the file type by the extension of the file name. Note that this is not reliable for several of the file types that share the same extension (e.g. .txt).

Parameters:
gisFrame - Frame holding spatial objects and in which to report results.
inFiles - File(s) to open.

OpenThread

public OpenThread(GISFrame gisFrame,
                  File[] inFiles,
                  int fileType,
                  int position)
Opens the relevant spatial object file(s).

Parameters:
gisFrame - Frame holding spatial objects and in which to report results.
inFiles - File(s) to open.
fileType - Type of file to open.
position - Raster selection type. Either GISFrame.PRIMARY, GISFrame.SECONDARY, GISFrame.NOT_SELECTED.
Method Detail

doProcessing

public void doProcessing()
Opens the spatial object file(s) requested. The newly opened spatial object(s) is/are stored in the GISFrame supplied to the constructor.

Note that this method will be called automatically if this is run as a threaded process (e.g. myOpenThread.start()). Alternatively it can be called directly as a non-threaded process.

Specified by:
doProcessing in class LSThread
See Also:
GISFrame


Copyright Jo Wood, 1996-2005, last modified, 11th March, 2005