|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jurvis.swing.JvPanelDialog
public class JvPanelDialog
A class that displays a panel within a JDialog.
The pattern this class implements follows the panel-dialog pattern set
by JColorChooser and JOptionPane.
| Nested Class Summary | |
|---|---|
class |
JvPanelDialog.CancelAction
The action mapped to the CANCEL button. |
class |
JvPanelDialog.OkAction
The action mapped to the OK button. |
| Field Summary | |
|---|---|
static int |
APPROVE_OPTION
Return value if approve (yes, ok) is chosen. |
static int |
CANCEL_OPTION
Return value if cancel is chosen. |
protected JDialog |
dialog
|
static int |
ERROR_OPTION
Return value if an error occured. |
protected int |
returnValue
|
| Constructor Summary | |
|---|---|
JvPanelDialog()
Construct a new JvPanelDialog. |
|
| Method Summary | |
|---|---|
void |
approveSelection()
Approve the user's selection and close the dialog. |
Action |
createCancelAction()
|
Action |
createOkAction()
|
void |
rejectSelection()
Reject the user's selection and close the dialog. |
int |
showDialog(Component parent,
JComponent panel,
String title)
Show a modal dialog with the specified panel as the dialog's contents. |
int |
showDialog(Component parent,
JComponent panel,
String title,
JButton defaultButton)
Show a modal dialog with the specified panel as the dialog's contents. |
static int |
showOkCancelDialog(Component parent,
JComponent panel,
String title)
Show a modal dialog with the specified panel as the dialog's contents and OK and Cancel buttons along the bottom. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int CANCEL_OPTION
public static final int APPROVE_OPTION
public static final int ERROR_OPTION
protected int returnValue
protected JDialog dialog
| Constructor Detail |
|---|
public JvPanelDialog()
JvPanelDialog.
| Method Detail |
|---|
public int showDialog(Component parent,
JComponent panel,
String title)
parent - the parent Component for the dialogpanel - the panel to be displayedtitle - the String containing the dialog's title
CANCEL_OPTION, ERROR_OPTION, APPROVE_OPTION
public int showDialog(Component parent,
JComponent panel,
String title,
JButton defaultButton)
parent - the parent Component for the dialogpanel - the panel to be displayedtitle - the String containing the dialog's titledefaultButton - the JButton which is to be the default button
CANCEL_OPTION, ERROR_OPTION, APPROVE_OPTION
public static int showOkCancelDialog(Component parent,
JComponent panel,
String title)
parent - the parent Component for the dialogpanel - the panel to be displayedtitle - the String containing the dialog's title
CANCEL_OPTION, ERROR_OPTION, APPROVE_OPTIONpublic void approveSelection()
public void rejectSelection()
public Action createOkAction()
public Action createCancelAction()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||