de.hillenbrand.jreqtools
Class ProgressTask

java.lang.Object
  extended by de.hillenbrand.jreqtools.ProgressTask

public abstract class ProgressTask
extends java.lang.Object


Constructor Summary
ProgressTask()
           
 
Method Summary
 void cancel()
           
abstract  int getCurrent()
           
abstract  java.lang.String getCurrentText()
           
 HDialog getDialog()
          Returns the dialog where the progress of the task is shown.
 java.lang.Exception getException()
           
abstract  int getMaximum()
           
abstract  int getMinimum()
           
abstract  void run()
           
 void setException(java.lang.Exception exception)
           
 void showError(java.lang.String message)
          Shows a message to the user.
 void showException(java.lang.Exception exc)
          Shows an exception to the user.
 boolean showQuestion(java.lang.String message)
          Shows a question to the user.
 int showQuestion(java.lang.String message, java.lang.String[] answers, javax.swing.Icon[] icons, int defaultAnswer)
          Shows a question to the user.
 int showQuestion(java.lang.String message, java.lang.String[] answers, int defaultAnswer)
          Shows a question to the user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProgressTask

public ProgressTask()
Method Detail

getException

public java.lang.Exception getException()

setException

public void setException(java.lang.Exception exception)

cancel

public void cancel()

getCurrent

public abstract int getCurrent()

getCurrentText

public abstract java.lang.String getCurrentText()

getDialog

public HDialog getDialog()
Returns the dialog where the progress of the task is shown. If the task has not yet been started, it returns null. You should use this method to show additional dialogs upon the one being shown for this task.

Returns:

getMaximum

public abstract int getMaximum()

getMinimum

public abstract int getMinimum()

run

public abstract void run()

showError

public void showError(java.lang.String message)
Shows a message to the user. This should be used instead of JReqTools.showMessage(), because only this method knows the real dialog which is being shown.

Parameters:
message -

showException

public void showException(java.lang.Exception exc)
Shows an exception to the user. This should be used instead of JReqTools.showException(), because only this method knows the real dialog which is being shown.

Parameters:
exc -

showQuestion

public boolean showQuestion(java.lang.String message)
Shows a question to the user. This should be used instead of JReqTools.showQuestion(), because only this method knows the real dialog which is being shown.

Parameters:
message -
Returns:

showQuestion

public int showQuestion(java.lang.String message,
                        java.lang.String[] answers,
                        int defaultAnswer)
Shows a question to the user. This should be used instead of JReqTools.showQuestion(), because only this method knows the real dialog which is being shown.

Parameters:
message -
answers -
defaultAnswer -
Returns:

showQuestion

public int showQuestion(java.lang.String message,
                        java.lang.String[] answers,
                        javax.swing.Icon[] icons,
                        int defaultAnswer)
Shows a question to the user. This should be used instead of JReqTools.showQuestion(), because only this method knows the real dialog which is being shown.

Parameters:
message -
answers -
icons -
defaultAnswer -
Returns: