|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectProgressController
ProgressWindow
@ThreadSafe public class ProgressWindow
Reports progress of a lengthly operation in a window. This implementation can also formats 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.

| display/geotk-widgets-swing (download) | View source code for this class |
| Constructor Summary | |
|---|---|
ProgressWindow(Component parent)
Creates a window for reporting progress. |
|
| Method Summary | |
|---|---|
void |
completed()
Notifies that the operation has finished. |
void |
dispose()
Releases any resource holds by this window. |
void |
exceptionOccurred(Throwable exception)
Displays an exception stack trace. |
String |
getTitle()
Returns the window title. |
void |
setProgress(float percent)
Notifies this controller of progress in the lengthly operation. |
void |
setTask(CharSequence task)
Sets the description of the current task being performed. |
void |
setTitle(String name)
Sets the window title. |
void |
started()
Notifies that the operation begins. |
void |
warningOccurred(String source,
String location,
String warning)
Displays a warning message under the progress bar. |
| Methods inherited from class ProgressController |
|---|
cancel, completed, failed, getLocale, getProgress, getTask, isCanceled, progressing, started |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ProgressWindow(Component parent)
started() method will be invoked.
parent - The parent component, or null if none.| Method Detail |
|---|
public void setTitle(String name)
null value resets the default title.
name - The new window title.public String getTitle()
public void setTask(CharSequence task)
setTask in class ProgressControllertask - Description of the task being performed as a String or
InternationalString, or null if none.public void started()
started in class ProgressControllerpublic void setProgress(float percent)
setProgress in class ProgressControllerpercent - The progress as a value between 0 and 100 inclusive.
public void warningOccurred(String source,
String location,
String warning)
warningOccurred in class ProgressControllersource - Name of the warning source, or null if none. This is typically the
filename in process of being parsed or the URL of the data being processed.location - Text to write on the left side of the warning message, or null if none.
This is typically the line number where the error occurred in the source
file or the feature ID of the feature that produced the message.warning - The warning message.public void exceptionOccurred(Throwable exception)
exceptionOccurred in class ProgressControllerexception - The exception to report.public void completed()
completed in class ProgressControllerpublic void dispose()
dispose in interface Disposable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||