|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectProgressWindow
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(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(Throwable exception)
Display an exception stack trace. |
String |
getDescription()
|
float |
getProgress()
|
InternationalString |
getTask()
|
String |
getTitle()
Returns the window title. |
boolean |
isCanceled()
|
void |
progress(float percent)
|
void |
setCanceled(boolean stop)
|
void |
setDescription(String description)
|
void |
setTask(InternationalString task)
|
void |
setTitle(String name)
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. |
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 String getTitle()
public void setTitle(String name)
null
value reset the default title.
public String getDescription()
getDescription
in interface ProgressListener
public void setDescription(String description)
setDescription
in interface ProgressListener
public void started()
started
in interface ProgressListener
public void progress(float percent)
progress
in interface ProgressListener
public float getProgress()
getProgress
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(String source, String margin, String warning)
warningOccurred
in interface ProgressListener
public void exceptionOccurred(Throwable exception)
exceptionOccurred
in interface ProgressListener
public void setTask(InternationalString task)
setTask
in interface ProgressListener
public InternationalString getTask()
getTask
in interface ProgressListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |