public class JProgressWindow extends Object implements ProgressListener
| Constructor and Description |
|---|
JProgressWindow(Component parent)
Creates a window for reporting progress.
|
| Modifier and Type | Method and Description |
|---|---|
void |
complete()
Notifies that the operation has finished.
|
void |
dispose()
Releases any resource holds by this window.
|
void |
exceptionOccurred(Throwable exception)
Display an exception stack trace.
|
String |
getDescription()
Deprecated.
|
float |
getProgress()
Returns the current progress as a percent completed.
|
InternationalString |
getTask()
Returns the description of the current task being performed, or
null if none. |
String |
getTitle()
Returns the window title.
|
boolean |
isCanceled()
Returns
true if this job is cancelled. |
void |
progress(float percent)
Notifies this listener of progress in the lengthly operation.
|
void |
setCanceled(boolean stop)
Indicates that task should be cancelled.
|
void |
setDescription(String description)
Deprecated.
|
void |
setTask(InternationalString task)
Sets the description of the current task being performed.
|
void |
setTitle(String title)
Set the window title.
|
void |
started()
Notifies that the operation begins.
|
void |
warningOccurred(String source,
String margin,
String warning)
Display a warning message under the progress bar.
|
public String getTitle()
public void setTitle(String title)
null value reset the default title.title - the window titlepublic String getDescription()
null if none.getDescription in interface ProgressListenerpublic void setDescription(String description)
setDescription in interface ProgressListenerdescription - The new description, or null if none.public void started()
started in interface ProgressListenerpublic void progress(float percent)
progress in interface ProgressListenerpercent - The progress as a value between 0 and 100 inclusive.public float getProgress()
ProgressListenergetProgress in interface ProgressListenerpublic void complete()
complete in interface ProgressListenerpublic void dispose()
dispose in interface ProgressListenerpublic boolean isCanceled()
true if this job is cancelled.isCanceled in interface ProgressListenertrue if this job is cancelled.public void setCanceled(boolean stop)
setCanceled in interface ProgressListenerstop - true to stop; false otherwisepublic void warningOccurred(String source, String margin, String warning)
warningOccurred in interface ProgressListenersource - DOCUMENT MEmargin - DOCUMENT MEwarning - DOCUMENT MEpublic void exceptionOccurred(Throwable exception)
exceptionOccurred in interface ProgressListenerexception - the exception to displaypublic void setTask(InternationalString task)
ProgressListenersetTask in interface ProgressListenertask - Description of the task being performed, or null if none.public InternationalString getTask()
ProgressListenernull if none. It is
assumed that if the task is null applications may simply report that the process is
"in progress" or "working" as represented in the current locale.getTask in interface ProgressListenernull if none.Copyright © 1996–2019 Geotools. All rights reserved.