edu.ucsb.nceas.morpho.util
Class ProgressBarThread

java.lang.Object
  extended byjava.lang.Thread
      extended byedu.ucsb.nceas.morpho.util.ProgressBarThread
All Implemented Interfaces:
java.lang.Runnable

public class ProgressBarThread
extends java.lang.Thread


Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ProgressBarThread()
          Create a new progress bar object with parentDialog as null and initialize a javax.swing.JProgressBar object.
ProgressBarThread(javax.swing.JDialog parentDialog)
          Create a new progress bar object with parentDialog passed as parameter and initialize a javax.swing.JProgressBar object.
 
Method Summary
 void exitProgressBarThread()
          Stops the timer, closes the dialog and exits.
 int getMaximumValue()
          gets the maximum value of the progress bar
 javax.swing.JDialog getParentDialog()
          gets the parentDialog
 javax.swing.JProgressBar getProgressBar()
          gets the progress bar
 java.lang.String getProgressBarString()
          gets the string that is shown on the progress bar.
 int getProgressUpdateTime()
          gets the time after which progress bar is updated
 int getProgressUpdateValue()
          gets the integer value by which progress bar is updated
 void run()
          Execute the thread.
 void setCustomCancelAction(javax.swing.Action a)
          Sets the javax.swing.Action to be executed on pressing the cancel button.
 void setMaximumValue(int maximumValue)
          Method to set the maximum value of the progress bar
 void setParentDialog(javax.swing.JDialog parentDialog)
          Method to set the parent dialog.
 void setProgressBar(javax.swing.JProgressBar progressBar)
          Method to set the progress bar.
 void setProgressBarString(java.lang.String value)
          Method to set the String shown on the progress bar.
 void setProgressUpdateTime(int progressUpdateTime)
          Method to set the time after which progress bar is updated
 void setProgressUpdateValue(int progressUpdateValue)
          Method to set the int value with which progress bar is updated.
 
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

ProgressBarThread

public ProgressBarThread()
Create a new progress bar object with parentDialog as null and initialize a javax.swing.JProgressBar object.


ProgressBarThread

public ProgressBarThread(javax.swing.JDialog parentDialog)
Create a new progress bar object with parentDialog passed as parameter and initialize a javax.swing.JProgressBar object.

Method Detail

run

public void run()
Execute the thread.


exitProgressBarThread

public void exitProgressBarThread()
Stops the timer, closes the dialog and exits.


getProgressBar

public javax.swing.JProgressBar getProgressBar()
gets the progress bar

Returns:
the Progress Bar being used in this dialog

setProgressBar

public void setProgressBar(javax.swing.JProgressBar progressBar)
Method to set the progress bar.

Parameters:
progressBar - JProgressBar

getProgressUpdateTime

public int getProgressUpdateTime()
gets the time after which progress bar is updated

Returns:
the time after which progress bar is updated...

getMaximumValue

public int getMaximumValue()
gets the maximum value of the progress bar

Returns:
gets the maximum value of the progress bar.

getProgressBarString

public java.lang.String getProgressBarString()
gets the string that is shown on the progress bar.

Returns:
the String that is shown on the progress bar.

getProgressUpdateValue

public int getProgressUpdateValue()
gets the integer value by which progress bar is updated

Returns:
the Integer value by which progress bar is updated

getParentDialog

public javax.swing.JDialog getParentDialog()
gets the parentDialog

Returns:
the parent JDialog

setProgressUpdateTime

public void setProgressUpdateTime(int progressUpdateTime)
Method to set the time after which progress bar is updated

Parameters:
progressUpdateTime - int

setMaximumValue

public void setMaximumValue(int maximumValue)
Method to set the maximum value of the progress bar

Parameters:
maximumValue - int

setProgressBarString

public void setProgressBarString(java.lang.String value)
Method to set the String shown on the progress bar.

Parameters:
value - String

setProgressUpdateValue

public void setProgressUpdateValue(int progressUpdateValue)
Method to set the int value with which progress bar is updated.

Parameters:
progressUpdateValue - int

setParentDialog

public void setParentDialog(javax.swing.JDialog parentDialog)
Method to set the parent dialog.

Parameters:
parentDialog - JDialog

setCustomCancelAction

public void setCustomCancelAction(javax.swing.Action a)
Sets the javax.swing.Action to be executed on pressing the cancel button. NOTE that the button's 'private' Action (defined elsewhere in this class) will be executed first, and then the custom action will be executed

Parameters:
a - javax.swing.Action to be executed


Copyright © 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.