com.sas.swing.visuals
Class CommandProgress

com.sas.swing.visuals.CommandProgress

public class CommandProgress

CommandProgress executes a command asynchronously, giving visual feedback in the form of a Dialog. The user is allowed to abort the command using a Cancel button.


Field Summary
protected static ProgressDialog _progressDialog
           
protected static boolean interrupted
           
 
Constructor Summary
CommandProgress()
           
 
Method Summary
protected static void doWork(java.awt.Frame parent, java.awt.Component ctr, java.net.URL codeBase, com.sas.swing.visuals.AbortableThread thread, java.lang.String dialogTitle, java.lang.String message, boolean allowCancel, java.awt.Dimension defaultDimension)
           
static void executeAsynchronously(ThreadedCommand command, java.lang.Object commandArg, java.lang.String dialogTitle, java.lang.String progressMessage, java.lang.Object owner, java.awt.Component ctr)
           
static void executeAsynchronously(ThreadedCommand command, java.lang.Object commandArg, java.lang.String dialogTitle, java.lang.String progressMessage, java.lang.Object owner, java.awt.Component ctr, boolean allowCancel)
           
static void executeAsynchronously(ThreadedCommand command, java.lang.Object commandArg, java.lang.String dialogTitle, java.lang.String progressMessage, java.lang.Object owner, java.awt.Component ctr, boolean allowCancel, java.awt.Dimension defaultDimension)
           
static ProgressDialog getProgressDialog()
          Returns the progress dialog.
static boolean isInterrupted()
          Returns whether the command was cancelled or threw an exception during its execution.
static void setInterrupted(boolean value)
          Sets whether the command was cancelled or threw an exception during its execution.
static void setMessage(java.lang.String message)
           
 

Field Detail

_progressDialog

protected static ProgressDialog _progressDialog

interrupted

protected static boolean interrupted
Constructor Detail

CommandProgress

public CommandProgress()
Method Detail

executeAsynchronously

public static void executeAsynchronously(ThreadedCommand command,
                                         java.lang.Object commandArg,
                                         java.lang.String dialogTitle,
                                         java.lang.String progressMessage,
                                         java.lang.Object owner,
                                         java.awt.Component ctr)
                                  throws java.lang.Exception
Throws:
java.lang.Exception

executeAsynchronously

public static void executeAsynchronously(ThreadedCommand command,
                                         java.lang.Object commandArg,
                                         java.lang.String dialogTitle,
                                         java.lang.String progressMessage,
                                         java.lang.Object owner,
                                         java.awt.Component ctr,
                                         boolean allowCancel)
                                  throws java.lang.Exception
Throws:
java.lang.Exception

executeAsynchronously

public static void executeAsynchronously(ThreadedCommand command,
                                         java.lang.Object commandArg,
                                         java.lang.String dialogTitle,
                                         java.lang.String progressMessage,
                                         java.lang.Object owner,
                                         java.awt.Component ctr,
                                         boolean allowCancel,
                                         java.awt.Dimension defaultDimension)
                                  throws java.lang.Exception
Throws:
java.lang.Exception

setMessage

public static void setMessage(java.lang.String message)

doWork

protected static void doWork(java.awt.Frame parent,
                             java.awt.Component ctr,
                             java.net.URL codeBase,
                             com.sas.swing.visuals.AbortableThread thread,
                             java.lang.String dialogTitle,
                             java.lang.String message,
                             boolean allowCancel,
                             java.awt.Dimension defaultDimension)
                      throws java.lang.Exception
Throws:
java.lang.Exception

setInterrupted

public static void setInterrupted(boolean value)
Sets whether the command was cancelled or threw an exception during its execution.

Parameters:
value - whether the command was cancelled or threw an exception during its execution.

isInterrupted

public static boolean isInterrupted()
Returns whether the command was cancelled or threw an exception during its execution.

Returns:
whether the command was cancelled or threw an exception during its execution.

getProgressDialog

public static ProgressDialog getProgressDialog()
Returns the progress dialog.

Returns:
the progress dialog.



Copyright © 2009 SAS Institute Inc. All Rights Reserved.