edu.wpi.prc.tools.builder.gui
Class ConnectionFormThread

java.lang.Object
  extended by java.lang.Thread
      extended by edu.wpi.prc.tools.builder.gui.ConnectionFormThread
All Implemented Interfaces:
java.lang.Runnable

public class ConnectionFormThread
extends java.lang.Thread

Attempts to connect to the project database. During the connection process, a window is displayed notifying the user that the Project Builder is busy trying to connect to the project database.

Author:
James Baldassari

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
private  javax.swing.JFrame connectingForm
           
private  DatabaseInitializerForm parentForm
           
private  Project project
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ConnectionFormThread(DatabaseInitializerForm parentForm)
          Constructor that takes a reference to the this thread's parent form.
 
Method Summary
 void cleanup()
          Destroys the "connecting" form.
 javax.swing.JFrame getForm()
           
 Project getProject()
          Reads the project that is stored in the database.
 void run()
          Makes the "connecting" window appear, and attempts to connect to the project database.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

parentForm

private DatabaseInitializerForm parentForm

connectingForm

private javax.swing.JFrame connectingForm

project

private Project project
Constructor Detail

ConnectionFormThread

public ConnectionFormThread(DatabaseInitializerForm parentForm)
Constructor that takes a reference to the this thread's parent form.

Method Detail

run

public void run()
Makes the "connecting" window appear, and attempts to connect to the project database.

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

cleanup

public void cleanup()
Destroys the "connecting" form.


getProject

public Project getProject()
                   throws org.hibernate.HibernateException
Reads the project that is stored in the database.

Returns:
The project that was retrieved from the database.
Throws:
org.hibernate.HibernateException

getForm

public javax.swing.JFrame getForm()
Returns:
Returns the "connecting" form.