org.mbari.siam.moos.utils.chart.graph
Class LoadData

java.lang.Object
  extended by java.lang.Thread
      extended by org.mbari.siam.moos.utils.chart.graph.LoadData
All Implemented Interfaces:
java.lang.Runnable

public class LoadData
extends java.lang.Thread

This class will load data (as a seperate thread) into a DataSet given a URL.

Version:
$Revision: 1.1 $, $Date: 2008/11/04 22:17:55 $
Author:
Leigh Brookshaw

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 int NUMERIC
          Flag used to specify the type of data to be loaded.
 int OBJECT
          Flag used to specify the type of data to be loaded.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
LoadData()
          Instantiate the class
LoadData(DataSet d)
          Instantiate the class
 
Method Summary
 boolean finished()
           
 double[] getArray()
           
 DataSet getDataSet()
           
 int length()
           
 void loadArray(java.net.URL file)
          Start loading the data into an Array.
 void loadArray(java.net.URL file, java.lang.Object drawable)
          Start loading the data into an array.
 DataSet loadDataSet(java.net.URL file)
          Start loading the data into a/the DataSet.
 DataSet loadDataSet(java.net.URL file, java.lang.Object drawable)
          Start loading the data into a/the DataSet.
 void run()
          The method to be run as a seperate thread.
 boolean started()
           
 
Methods inherited from class java.lang.Thread
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, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NUMERIC

public final int NUMERIC
Flag used to specify the type of data to be loaded. That is purely numerical.

See Also:
Constant Field Values

OBJECT

public final int OBJECT
Flag used to specify the type of data to be loaded. That is can contain non-numerical data. Not Implemented

See Also:
Constant Field Values
Constructor Detail

LoadData

public LoadData()
Instantiate the class


LoadData

public LoadData(DataSet d)
Instantiate the class

Parameters:
d - DataSet to load the data into.
Method Detail

loadDataSet

public DataSet loadDataSet(java.net.URL file)
Start loading the data into a/the DataSet.

Parameters:
file - URL of data file
Returns:
The DataSet that the data will be loaded into

loadArray

public void loadArray(java.net.URL file)
Start loading the data into an Array.

Parameters:
file - URL of data file

loadDataSet

public DataSet loadDataSet(java.net.URL file,
                           java.lang.Object drawable)
Start loading the data into a/the DataSet.

Parameters:
file - URL of data file
drawable - An object that can be drawn to that will indicate that data is loading. eg. An applet or the Graph2D canvas.

loadArray

public void loadArray(java.net.URL file,
                      java.lang.Object drawable)
Start loading the data into an array.

Parameters:
file - URL of data file
drawable - An object that can be drawn to that will indicate that data is loading. eg. An applet or the Graph2D canvas.

run

public void run()
The method to be run as a seperate thread. It does all the work

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

getDataSet

public DataSet getDataSet()
Returns:
The DataSet that is being filled.

getArray

public double[] getArray()
Returns:
The loaded data array.

started

public boolean started()
Returns:
true if the data has started loading.

finished

public boolean finished()
Returns:
true if the data has finished loading.

length

public int length()
Returns:
The current size of the data array.


Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.