|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.swing.ProgressWindow
public class ProgressWindow
Reports progress of a lengthly operation in a window. This implementation can also format warnings. Its method can be invoked from any thread (it doesn't need to be the Swing thread), which make it easier to use it from some background thread. Such background thread should have a low priority in order to avoid delaying Swing repaint events.
Constructor Summary | |
---|---|
ProgressWindow(java.awt.Component parent)
Creates a window for reporting progress. |
Method Summary | |
---|---|
void |
complete()
Notifies that the operation has finished. |
void |
dispose()
Releases any resource holds by this window. |
void |
exceptionOccurred(java.lang.Throwable exception)
Display an exception stack trace. |
java.lang.String |
getDescription()
Deprecated. |
float |
getProgress()
|
org.opengis.util.InternationalString |
getTask()
|
java.lang.String |
getTitle()
Returns the window title. |
boolean |
isCanceled()
|
void |
progress(float percent)
|
void |
setCanceled(boolean stop)
|
void |
setDescription(java.lang.String description)
Deprecated. |
void |
setTask(org.opengis.util.InternationalString task)
|
void |
setTitle(java.lang.String title)
Set the window title. |
void |
started()
Notifies that the operation begins. |
void |
warningOccurred(java.lang.String source,
java.lang.String margin,
java.lang.String warning)
Display a warning message under the progress bar. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProgressWindow(java.awt.Component parent)
started()
method will be invoked.
parent
- The parent component, or null
if none.Method Detail |
---|
public java.lang.String getTitle()
public void setTitle(java.lang.String title)
null
value reset the default title.
title
- the window titlepublic java.lang.String getDescription()
getDescription
in interface org.opengis.util.ProgressListener
public void setDescription(java.lang.String description)
setDescription
in interface org.opengis.util.ProgressListener
public void started()
started
in interface org.opengis.util.ProgressListener
public void progress(float percent)
progress
in interface org.opengis.util.ProgressListener
public float getProgress()
getProgress
in interface org.opengis.util.ProgressListener
public void complete()
complete
in interface org.opengis.util.ProgressListener
public void dispose()
dispose
in interface org.opengis.util.ProgressListener
public boolean isCanceled()
isCanceled
in interface org.opengis.util.ProgressListener
public void setCanceled(boolean stop)
setCanceled
in interface org.opengis.util.ProgressListener
stop
- true to stop; false otherwisepublic void warningOccurred(java.lang.String source, java.lang.String margin, java.lang.String warning)
warningOccurred
in interface org.opengis.util.ProgressListener
source
- DOCUMENT MEmargin
- DOCUMENT MEwarning
- DOCUMENT MEpublic void exceptionOccurred(java.lang.Throwable exception)
exceptionOccurred
in interface org.opengis.util.ProgressListener
exception
- the exception to displaypublic void setTask(org.opengis.util.InternationalString task)
setTask
in interface org.opengis.util.ProgressListener
public org.opengis.util.InternationalString getTask()
getTask
in interface org.opengis.util.ProgressListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |