public class PleaseWaitProgressMonitor extends AbstractProgressMonitor
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 |
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 |
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() |
void |
doBeginTask() |
void |
doFinishTask() |
private static 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) |
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() |
void |
reset() |
void |
setCancelable(boolean 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() |
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
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 titleprivate static void doInEDT(java.lang.Runnable runnable)
private void setDialogVisible(boolean visible)
private PleaseWaitProgressMonitor.ProgressMonitorDialog getDialog()
public final boolean isCancelable()
public final void setCancelable(boolean cancelable)
public 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