org.openstreetmap.josm.gui.progress
Class PleaseWaitProgressMonitor

java.lang.Object
  extended by org.openstreetmap.josm.gui.progress.AbstractProgressMonitor
      extended by org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor
All Implemented Interfaces:
ProgressMonitor

public class PleaseWaitProgressMonitor
extends AbstractProgressMonitor


Nested Class Summary
static interface PleaseWaitProgressMonitor.ProgressMonitorDialog
          Implemented by both foreground dialog and background progress dialog (in status bar)
 
Nested classes/interfaces inherited from class org.openstreetmap.josm.gui.progress.AbstractProgressMonitor
AbstractProgressMonitor.State
 
Nested classes/interfaces inherited from interface org.openstreetmap.josm.gui.progress.ProgressMonitor
ProgressMonitor.CancelListener
 
Field Summary
private  boolean cancelable
           
private  java.awt.event.ActionListener cancelListener
           
private  int currentProgressValue
           
private  java.lang.String customText
           
private  PleaseWaitDialog dialog
           
private  java.awt.Window 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
           
 
Fields inherited from class org.openstreetmap.josm.gui.progress.AbstractProgressMonitor
state, ticks, ticksCount
 
Fields inherited from interface org.openstreetmap.josm.gui.progress.ProgressMonitor
ALL_TICKS, DEFAULT_TICKS
 
Constructor Summary
PleaseWaitProgressMonitor()
           
PleaseWaitProgressMonitor(java.awt.Component dialogParent)
           
PleaseWaitProgressMonitor(java.awt.Component dialogParent, java.lang.String windowTitle)
           
PleaseWaitProgressMonitor(java.lang.String windowTitle)
           
 
Method Summary
 void appendLogMessage(java.lang.String message)
          Default implementation is empty.
 void close()
           
 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)
           
private  PleaseWaitProgressMonitor.ProgressMonitorDialog getDialog()
           
 ProgressTaskId getProgressTaskId()
          Should be used only by PleaseWaitRunnable
 java.awt.Component getWindowParent()
           
 boolean isCancelable()
           
 void reset()
           
 void setCancelable(boolean cancelable)
           
private  void setDialogVisible(boolean visible)
           
 void setProgressTaskId(ProgressTaskId taskId)
          Should be used only by PleaseWaitRunnable.
 void showForegroundDialog()
           
protected  void updateProgress(double progressValue)
           
 
Methods inherited from class org.openstreetmap.josm.gui.progress.AbstractProgressMonitor
addCancelListener, beginTask, beginTask, cancel, checkState, childFinished, childSetCustomText, childSetIntermediate, childSetProgress, childSetTitle, createSubTaskMonitor, finishTask, getTicks, getTicksCount, indeterminateSubTask, invalidate, isCanceled, removeCancelListener, setCustomText, setExtraText, setTicks, setTicksCount, subTask, worked
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROGRESS_BAR_MAX

public static final int PROGRESS_BAR_MAX
See Also:
Constant Field Values

dialogParent

private final java.awt.Window dialogParent

currentProgressValue

private int currentProgressValue

customText

private java.lang.String customText

title

private java.lang.String title

indeterminate

private boolean indeterminate

isInBackground

private boolean isInBackground

dialog

private PleaseWaitDialog dialog

windowTitle

private java.lang.String windowTitle

taskId

protected ProgressTaskId taskId

cancelable

private boolean cancelable

cancelListener

private java.awt.event.ActionListener cancelListener

inBackgroundListener

private java.awt.event.ActionListener inBackgroundListener

windowListener

private java.awt.event.WindowListener windowListener
Constructor Detail

PleaseWaitProgressMonitor

public PleaseWaitProgressMonitor()

PleaseWaitProgressMonitor

public PleaseWaitProgressMonitor(java.lang.String windowTitle)

PleaseWaitProgressMonitor

public PleaseWaitProgressMonitor(java.awt.Component dialogParent)

PleaseWaitProgressMonitor

public PleaseWaitProgressMonitor(java.awt.Component dialogParent,
                                 java.lang.String windowTitle)
Method Detail

doInEDT

private void doInEDT(java.lang.Runnable runnable)

setDialogVisible

private void setDialogVisible(boolean visible)

getDialog

private PleaseWaitProgressMonitor.ProgressMonitorDialog getDialog()

isCancelable

public final boolean isCancelable()

setCancelable

public final void setCancelable(boolean cancelable)

doBeginTask

public void doBeginTask()
Specified by:
doBeginTask in class AbstractProgressMonitor

doFinishTask

public void doFinishTask()
Specified by:
doFinishTask in class AbstractProgressMonitor

updateProgress

protected void updateProgress(double progressValue)
Specified by:
updateProgress in class AbstractProgressMonitor

doSetCustomText

protected void doSetCustomText(java.lang.String title)
Specified by:
doSetCustomText in class AbstractProgressMonitor

doSetTitle

protected void doSetTitle(java.lang.String title)
Specified by:
doSetTitle in class AbstractProgressMonitor

doSetIntermediate

protected void doSetIntermediate(boolean value)
Specified by:
doSetIntermediate in class AbstractProgressMonitor

appendLogMessage

public void appendLogMessage(java.lang.String message)
Description copied from class: AbstractProgressMonitor
Default implementation is empty. Override in subclasses to display the log messages.

Specified by:
appendLogMessage in interface ProgressMonitor
Overrides:
appendLogMessage in class AbstractProgressMonitor
Parameters:
message - the log message. Ignored if null or white space only.

reset

public void reset()

close

public void close()

showForegroundDialog

public void showForegroundDialog()

setProgressTaskId

public void setProgressTaskId(ProgressTaskId taskId)
Description copied from interface: ProgressMonitor
Should be used only by PleaseWaitRunnable. If taskId <> null then "In background" button will be shown


getProgressTaskId

public ProgressTaskId getProgressTaskId()
Description copied from interface: ProgressMonitor
Should be used only by PleaseWaitRunnable


getWindowParent

public java.awt.Component getWindowParent()
Returns:
component suitable as parent for dialogs that wants to be shown in front of progress dialog


JOSM