public class PleaseWaitProgressMonitor extends AbstractProgressMonitor
PleaseWaitRunnable
.
Progress is displayed in a dialog window (PleaseWaitDialog
).
gui.progress
package}Modifier and Type | Class and Description |
---|---|
static interface |
PleaseWaitProgressMonitor.ProgressMonitorDialog
Implemented by both foreground dialog and background progress dialog (in status bar)
|
AbstractProgressMonitor.State
ProgressMonitor.CancelListener
Modifier and Type | Field and Description |
---|---|
private boolean |
cancelable |
private java.awt.event.ActionListener |
cancelListener |
(package private) static PleaseWaitProgressMonitor |
currentProgressMonitor
The progress monitor being currently displayed.
|
private int |
currentProgressValue |
private java.lang.String |
customText |
private PleaseWaitDialog |
dialog |
private java.awt.Component |
dialogParent |
private java.awt.event.ActionListener |
inBackgroundListener |
private boolean |
indeterminate |
private boolean |
isInBackground |
static int |
PROGRESS_BAR_MAX
The maximum value the progress bar that displays the current progress should have.
|
protected ProgressTaskId |
taskId |
private java.lang.String |
title |
private java.awt.event.WindowListener |
windowListener |
private java.lang.String |
windowTitle |
state
ALL_TICKS, DEFAULT_TICKS
Constructor and Description |
---|
PleaseWaitProgressMonitor()
Constructs a new
PleaseWaitProgressMonitor . |
PleaseWaitProgressMonitor(java.awt.Component dialogParent)
Constructs a new
PleaseWaitProgressMonitor . |
PleaseWaitProgressMonitor(java.awt.Component dialogParent,
java.lang.String windowTitle)
Constructs a new
PleaseWaitProgressMonitor . |
PleaseWaitProgressMonitor(java.lang.String windowTitle)
Constructs a new
PleaseWaitProgressMonitor . |
Modifier and Type | Method and Description |
---|---|
void |
appendLogMessage(java.lang.String message)
Default implementation is empty.
|
void |
close()
Close the progress dialog window.
|
void |
doBeginTask() |
void |
doFinishTask() |
private void |
doInEDT(java.lang.Runnable runnable) |
protected void |
doSetCustomText(java.lang.String title) |
protected void |
doSetIntermediate(boolean value) |
protected void |
doSetTitle(java.lang.String title) |
static PleaseWaitProgressMonitor |
getCurrent()
Returns the progress monitor being currently displayed.
|
private PleaseWaitProgressMonitor.ProgressMonitorDialog |
getDialog() |
ProgressTaskId |
getProgressTaskId()
Returns the task ID of the progress dialog
Should be used only by PleaseWaitRunnable
|
java.awt.Component |
getWindowParent()
Return the parent windows of progress dialog
|
boolean |
isCancelable()
See if this task is canceleable
|
void |
reset()
Update the dialog values
|
void |
setCancelable(boolean cancelable)
Sets this task to be cancelable
|
private void |
setDialogVisible(boolean visible) |
void |
setProgressTaskId(ProgressTaskId taskId)
Set the task ID of the progress dialog
Should be used only by PleaseWaitRunnable.
|
void |
showForegroundDialog()
Show the progress dialog in foreground
|
java.lang.String |
toString() |
protected void |
updateProgress(double progressValue) |
addCancelListener, beginTask, beginTask, cancel, checkState, childFinished, childSetCustomText, childSetIntermediate, childSetProgress, childSetTitle, createSubTaskMonitor, finishTask, getTicks, getTicksCount, indeterminateSubTask, invalidate, isCanceled, removeCancelListener, setCustomText, setExtraText, setTicks, setTicksCount, subTask, worked
public static final int PROGRESS_BAR_MAX
static PleaseWaitProgressMonitor currentProgressMonitor
private final java.awt.Component dialogParent
private int currentProgressValue
private java.lang.String customText
private java.lang.String title
private boolean indeterminate
private boolean isInBackground
private PleaseWaitDialog dialog
private java.lang.String windowTitle
protected ProgressTaskId taskId
private boolean cancelable
private final java.awt.event.ActionListener cancelListener
private final java.awt.event.ActionListener inBackgroundListener
private final java.awt.event.WindowListener windowListener
public PleaseWaitProgressMonitor()
PleaseWaitProgressMonitor
.public PleaseWaitProgressMonitor(java.lang.String windowTitle)
PleaseWaitProgressMonitor
.windowTitle
- window titlepublic PleaseWaitProgressMonitor(java.awt.Component dialogParent)
PleaseWaitProgressMonitor
.dialogParent
- component to get parent frame frompublic PleaseWaitProgressMonitor(java.awt.Component dialogParent, java.lang.String windowTitle)
PleaseWaitProgressMonitor
.dialogParent
- component to get parent frame fromwindowTitle
- window titlepublic static PleaseWaitProgressMonitor getCurrent()
private void doInEDT(java.lang.Runnable runnable)
private void setDialogVisible(boolean visible)
private PleaseWaitProgressMonitor.ProgressMonitorDialog getDialog()
public final boolean isCancelable()
true
if it can be canceledpublic final void setCancelable(boolean cancelable)
cancelable
- Whether it can be canceledpublic void doBeginTask()
doBeginTask
in class AbstractProgressMonitor
public void doFinishTask()
doFinishTask
in class AbstractProgressMonitor
protected void updateProgress(double progressValue)
updateProgress
in class AbstractProgressMonitor
protected void doSetCustomText(java.lang.String title)
doSetCustomText
in class AbstractProgressMonitor
protected void doSetTitle(java.lang.String title)
doSetTitle
in class AbstractProgressMonitor
protected void doSetIntermediate(boolean value)
doSetIntermediate
in class AbstractProgressMonitor
public void appendLogMessage(java.lang.String message)
AbstractProgressMonitor
appendLogMessage
in interface ProgressMonitor
appendLogMessage
in class AbstractProgressMonitor
message
- the log message. Ignored if null or white space only.public void reset()
public void close()
public void showForegroundDialog()
public void setProgressTaskId(ProgressTaskId taskId)
ProgressMonitor
<> null
then "In background" button will be showntaskId
- the task IDpublic ProgressTaskId getProgressTaskId()
ProgressMonitor
public java.awt.Component getWindowParent()
ProgressMonitor
public java.lang.String toString()
toString
in class java.lang.Object