|
org.netbeans.api.progress/1 1.16.1 1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.api.progress.ProgressUtils
public final class ProgressUtils
Useful static methods
Method Summary | |
---|---|
static void |
runOffEventDispatchThread(Runnable operation,
String operationDescr,
AtomicBoolean cancelOperation,
boolean waitForCanceled)
Runs operation out of event dispatch thread, blocks UI while operation is in progress. |
static void |
runOffEventDispatchThread(Runnable operation,
String operationDescr,
AtomicBoolean cancelOperation,
boolean waitForCanceled,
int waitCursorAfter,
int dialogAfter)
Runs operation out of event dispatch thread, blocks UI while operation is in progress. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void runOffEventDispatchThread(Runnable operation, String operationDescr, AtomicBoolean cancelOperation, boolean waitForCanceled)
This method is supposed to be used by user invoked foreground actions, that are expected to run very fast in vast majority of cases. However, in some rather rare cases (e.g. extensive IO operations in progress), supplied operation may need longer time. In such case this method first displays wait cursor and if operation takes even more time it displays dialog allowing to cancel operation. DO NOT use this method for operations that may take long time under normal circumstances!
operation
- operation to performoperationDescr
- text shown in dialogcancelOperation
- set to true if user canceled the operationwaitForCanceled
- true if method should wait until canceled task is finished (if it is not finished in 1s ISE is thrown)public static void runOffEventDispatchThread(Runnable operation, String operationDescr, AtomicBoolean cancelOperation, boolean waitForCanceled, int waitCursorAfter, int dialogAfter)
This method is supposed to be used by user invoked foreground actions, that are expected to run very fast in vast majority of cases. However, in some rather rare cases (e.g. extensive IO operations in progress), supplied operation may need longer time. In such case this method first displays wait cursor and if operation takes even more time it displays dialog allowing to cancel operation. DO NOT use this method for operations that may take long time under normal circumstances!
operation
- operation to performoperationDescr
- text shown in dialogcancelOperation
- set to true if user canceled the operationwaitForCanceled
- true if method should wait until canceled task is finished (if it is not finished in 1s ISE is thrown)waitCursorAfter
- time in ms after which wait cursor is showndialogAfter
- time in ms after which dialog with "Cancel" button is shown
|
org.netbeans.api.progress/1 1.16.1 1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |