|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openstreetmap.josm.gui.PleaseWaitRunnable
public abstract class PleaseWaitRunnable
Instanced of this thread will display a "Please Wait" message in middle of JOSM to indicate a progress being executed.
Field Summary | |
---|---|
private boolean |
canceled
|
private boolean |
ignoreException
|
protected ProgressMonitor |
progressMonitor
|
private java.lang.String |
title
|
Constructor Summary | |
---|---|
PleaseWaitRunnable(java.awt.Component parent,
java.lang.String title,
boolean ignoreException)
Create the runnable object with a given message for the user |
|
PleaseWaitRunnable(java.lang.String title)
Create the runnable object with a given message for the user. |
|
PleaseWaitRunnable(java.lang.String title,
boolean ignoreException)
Create the runnable object with a given message for the user. |
|
PleaseWaitRunnable(java.lang.String title,
ProgressMonitor progressMonitor,
boolean ignoreException)
|
Method Summary | |
---|---|
protected void |
afterFinish()
Can be overriden if something needs to run after progress monitor is closed. |
protected abstract void |
cancel()
User pressed cancel button. |
ProgressTaskId |
canRunInBackground()
Task can run in background if returned value <> null. |
private void |
doRealRun()
|
protected abstract void |
finish()
Finish up the data work. |
ProgressMonitor |
getProgressMonitor()
|
void |
operationCanceled()
|
protected abstract void |
realRun()
Called in the worker thread to do the actual work. |
void |
run()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private boolean canceled
private boolean ignoreException
private final java.lang.String title
protected final ProgressMonitor progressMonitor
Constructor Detail |
---|
public PleaseWaitRunnable(java.lang.String title)
public PleaseWaitRunnable(java.lang.String title, boolean ignoreException)
title
- message for the userignoreException
- If true, exception will be propagated to calling code. If false then
exception will be thrown directly in EDT. When this runnable is executed using executor framework
then use false unless you read result of task (because exception will get lost if you don't)public PleaseWaitRunnable(java.awt.Component parent, java.lang.String title, boolean ignoreException) throws java.lang.IllegalArgumentException
parent
- the parent component for the please wait dialog. Must not be null.title
- message for the userignoreException
- If true, exception will be propagated to calling code. If false then
exception will be thrown directly in EDT. When this runnable is executed using executor framework
then use false unless you read result of task (because exception will get lost if you don't)
java.lang.IllegalArgumentException
- thrown if parent is nullpublic PleaseWaitRunnable(java.lang.String title, ProgressMonitor progressMonitor, boolean ignoreException)
Method Detail |
---|
private void doRealRun()
protected void afterFinish()
public final void run()
run
in interface java.lang.Runnable
public void operationCanceled()
operationCanceled
in interface ProgressMonitor.CancelListener
protected abstract void cancel()
protected abstract void realRun() throws org.xml.sax.SAXException, java.io.IOException, OsmTransferException
org.xml.sax.SAXException
java.io.IOException
OsmTransferException
protected abstract void finish()
public ProgressMonitor getProgressMonitor()
public ProgressTaskId canRunInBackground()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |