|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
org.af.commons.threading.ProgressDialog<T,V>
T - Result type of SafeSwingWorkerV - Intermediate type of SafeSwingWorkerpublic class ProgressDialog<T,V>
Dialog that visualizes the progess of a SafeSwingworker by using a ProgressPanel. The task is automatically started when the dialog is made visible.
| Field Summary |
|---|
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.WindowConstants |
|---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
ProgressDialog(Dialog parent,
String title,
SafeSwingWorker<T,V> task,
boolean modal,
boolean abortable)
Constructor |
|
ProgressDialog(Dialog parent,
String title,
SafeSwingWorker<T,V> task,
boolean modal,
boolean abortable,
JPanel extraPanel)
Constructor |
|
ProgressDialog(Frame parent,
String title,
SafeSwingWorker<T,V> task,
boolean modal,
boolean abortable)
Constructor |
|
ProgressDialog(Frame parent,
String title,
SafeSwingWorker<T,V> task,
boolean modal,
boolean abortable,
JPanel extraPanel)
Constructor |
|
| Method Summary | ||
|---|---|---|
void |
actionPerformed(ActionEvent e)
Action handling for OK button. |
|
SafeSwingWorker<T,V> |
getTask()
Returns the associated task for the ProgressPanel. |
|
boolean |
isCloseOnTaskIsFinished()
Should the dialog automatically be closed when the task reaches 100% ? |
|
static
|
make(Component parent,
String title,
SafeSwingWorker<T,V> task,
boolean modal,
boolean abortable)
Constructor |
|
static
|
make(Component parent,
String title,
SafeSwingWorker<T,V> task,
boolean modal,
boolean abortable,
JPanel extraPanel)
Constructor |
|
void |
propertyChange(PropertyChangeEvent evt)
If progress property of SafeSwingWorker reaches 100% we are done and enable the OK button. |
|
void |
setCloseOnTaskIsFinished(boolean closeOnFinish)
Set to true if the dialog should automatically be closed when the task reaches 100%. |
|
void |
setVisible(boolean b)
|
|
| Methods inherited from class javax.swing.JDialog |
|---|
getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, update |
| Methods inherited from class java.awt.Dialog |
|---|
addNotify, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setResizable, setTitle, setUndecorated, show |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ProgressDialog(Frame parent,
String title,
SafeSwingWorker<T,V> task,
boolean modal,
boolean abortable,
JPanel extraPanel)
parent - Parent frame to place the dialog on.title - Title of the dialog.task - Monitored task.modal - Use a modal dialog?abortable - Allowed to abort the task by closing the dialog? If not a warning is displayed that the application will exit.extraPanel - Additional panel, displayed above the message Panel.
public ProgressDialog(Frame parent,
String title,
SafeSwingWorker<T,V> task,
boolean modal,
boolean abortable)
parent - Parent frame to place the dialog on.title - Title of the dialog.task - Monitored task.modal - Use a modal dialog?abortable - Allowed to abort the task by closing the dialog? If not a warning is displayed that the application will exit.
public ProgressDialog(Dialog parent,
String title,
SafeSwingWorker<T,V> task,
boolean modal,
boolean abortable,
JPanel extraPanel)
parent - Parent dialog to place the dialog on.title - Title of the dialog.task - Monitored task.modal - Use a modal dialog?abortable - Allowed to abort the task by closing the dialog? If not a warning is displayed that the application will exit.extraPanel - Additional panel, displayed above the message Panel.
public ProgressDialog(Dialog parent,
String title,
SafeSwingWorker<T,V> task,
boolean modal,
boolean abortable)
parent - Parent dialog to place the dialog on.title - Title of the dialog.task - Monitored task.modal - Use a modal dialog?abortable - Allowed to abort the task by closing the dialog? If not a warning is displayed that the application will exit.| Method Detail |
|---|
public static <T,V> ProgressDialog<T,V> make(Component parent,
String title,
SafeSwingWorker<T,V> task,
boolean modal,
boolean abortable,
JPanel extraPanel)
parent - Parent dialog to place the dialog on.title - Title of the dialog.task - Monitored task.modal - Use a modal dialog?abortable - Allowed to abort the task by closing the dialog? If not a warning is displayed that the application will exit.extraPanel - Additional panel, displayed above the message Panel.
public static <T,V> ProgressDialog<T,V> make(Component parent,
String title,
SafeSwingWorker<T,V> task,
boolean modal,
boolean abortable)
parent - Parent dialog to place the dialog on.title - Title of the dialog.task - Monitored task.modal - Use a modal dialog?abortable - Allowed to abort the task by closing the dialog? If not a warning is displayed that the application will exit.public void propertyChange(PropertyChangeEvent evt)
propertyChange in interface PropertyChangeListenerevt - eventpublic void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenere - eventpublic boolean isCloseOnTaskIsFinished()
public void setCloseOnTaskIsFinished(boolean closeOnFinish)
closeOnFinish - True iff the dialog is automatically closed when the task reaches 100%.public void setVisible(boolean b)
setVisible in class Componentpublic SafeSwingWorker<T,V> getTask()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||