com.jmo.mailmessager.display
Class MailMessagerStatusBar

java.lang.Object
  extended by java.lang.Thread
      extended by com.jmo.mailmessager.display.MailMessagerStatusBar
All Implemented Interfaces:
java.lang.Runnable

public class MailMessagerStatusBar
extends java.lang.Thread

Thread creates Status Bar window that is updated with what's going on during MailMessager's startup.

Version:
0.0.1
Author:
John Morales
See Also:
MailMessagerConstants

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
MailMessagerStatusBar()
          Creates a new MailMessagerStatusBar
 
Method Summary
static void closeWindow()
          Called when you want to close the Status Bar without error.
static void closeWindow(java.lang.String message)
          Called when you want to close the StatusBar.
static javax.swing.JLabel getHeadlingLabelInstance()
          Return instance of StatusBar's shared headingLabel.
static void main(java.lang.String[] args)
          Display status bar -- for debugging status bar's appearance.
 void run()
          Thread to construct initial StatusBar window.
static void updateStatus(java.lang.String status)
          Update message of what's currently happening and increase the status bar by coloring the next section of progress panes blue.
 
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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MailMessagerStatusBar

public MailMessagerStatusBar()
Creates a new MailMessagerStatusBar

Method Detail

main

public static void main(java.lang.String[] args)
Display status bar -- for debugging status bar's appearance.


run

public void run()
Thread to construct initial StatusBar window.

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

updateStatus

public static void updateStatus(java.lang.String status)
Update message of what's currently happening and increase the status bar by coloring the next section of progress panes blue.

Parameters:
status - New message to be displayed about what's currently happening.

closeWindow

public static void closeWindow()
                        throws java.lang.Exception
Called when you want to close the Status Bar without error. Calls closeWindow with "Finishing..." as argument.

Throws:
java.lang.Exception - If thread is interrupted while sleeping for one second.

closeWindow

public static void closeWindow(java.lang.String message)
                        throws java.lang.Exception
Called when you want to close the StatusBar. Displays supplied message string on the StatusBar, fills in any remaining gray progress panes blue, sleeps for one second, then hides window.

Parameters:
message - String to display on StatusBar.
Throws:
java.lang.Exception - If thread is interrupted while sleeping for one second.

getHeadlingLabelInstance

public static javax.swing.JLabel getHeadlingLabelInstance()
Return instance of StatusBar's shared headingLabel.