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.
|
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 |
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 void setTask(InternationalString task)
ProgressListener
setTask
in interface ProgressListener
task
- Description of the task being performed, or null
if none.public void started()
started
in interface ProgressListener
public void progress(float percent)
progress
in interface ProgressListener
percent
- The progress as a value between 0 and 100 inclusive.public float getProgress()
ProgressListener
getProgress
in interface ProgressListener
public void complete()
complete
in interface ProgressListener
public void dispose()
dispose
in interface ProgressListener
public boolean isCanceled()
true
if this job is cancelled.isCanceled
in interface ProgressListener
true
if this job is cancelled.public void setCanceled(boolean stop)
setCanceled
in interface ProgressListener
stop
- true to stop; false otherwisepublic void warningOccurred(String source, String margin, String warning)
warningOccurred
in interface ProgressListener
source
- DOCUMENT MEmargin
- DOCUMENT MEwarning
- DOCUMENT MEpublic void exceptionOccurred(Throwable exception)
exceptionOccurred
in interface ProgressListener
exception
- the exception to displaypublic InternationalString getTask()
ProgressListener
null
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 ProgressListener
null
if none.Copyright © 1996–2023 Geotools. All rights reserved.