|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.gui.swing.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()
Returns the description for the lengthly operation to be reported, or if none. |
java.lang.String |
getTitle()
Returns the window title. |
boolean |
isCanceled()
Is this job canceled? |
void |
progress(float percent)
Notifies this listener of progress in the lengthly operation. Progress are reported as a value between 0 and 100 inclusive. Values out of bounds will be clamped. |
void |
setCanceled(boolean stop)
Indicate that progress should is canceled. |
void |
setDescription(java.lang.String description)
Set the description for the lenghtly operation to be reported. This method is usually invoked before any progress begins. However, it is legal to invoke this method at any time during the operation, in which case the description display is updated without any change to the percentage accomplished. |
void |
setTitle(java.lang.String name)
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 if none.Method Detail |
public java.lang.String getTitle()
public void setTitle(java.lang.String name)
public java.lang.String getDescription()
getDescription
in interface ProgressListener
public void setDescription(java.lang.String description)
setDescription
in interface ProgressListener
description
- The new description, or if none.public void started()
started
in interface ProgressListener
public void progress(float percent)
progress
in interface ProgressListener
public void complete()
complete
in interface ProgressListener
public void dispose()
dispose
in interface ProgressListener
public boolean isCanceled()
isCanceled
in interface ProgressListener
public void setCanceled(boolean stop)
setCanceled
in interface ProgressListener
public void warningOccurred(java.lang.String source, java.lang.String margin, java.lang.String warning)
warningOccurred
in interface ProgressListener
source
- The source of the warning, or if none. This is typically the
filename in process of being parsed.margin
- Text to write on the left side of the warning message, or if none.
This is typically the line number where the error occured in the file.warning
- The warning message.public void exceptionOccurred(java.lang.Throwable exception)
exceptionOccurred
in interface ProgressListener
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |