public class DialogSupport extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
DialogSupport.DialogFactory
Deprecated.
DialogFactory implementation is a class responsible for providing
proper implementation of Dialog containing required widgets.
|
Modifier and Type | Method and Description |
---|---|
static Dialog |
createDialog(String title,
JPanel panel,
boolean modal,
JButton[] buttons,
boolean sidebuttons,
int defaultIndex,
int cancelIndex,
ActionListener listener)
Deprecated.
The method for creating a dialog with specified properties.
|
static void |
setDialogFactory(DialogSupport.DialogFactory factory)
Deprecated.
The method for setting custom factory for creating dialogs via
the
createDialog method. |
public static Dialog createDialog(String title, JPanel panel, boolean modal, JButton[] buttons, boolean sidebuttons, int defaultIndex, int cancelIndex, ActionListener listener)
title
- The title of created dialog.panel
- The content of the dialog to be displayed.modal
- Whether the dialog should be modal.buttons
- The array of JButtons to be added to the dialog.sidebuttons
- The buttons could be placed under the panel (false),
or on the right side of the panel (true).defaultIndex
- The index of default button in the buttons array,
if index < 0
, no default button is set.cancelIndex
- The index about cancel button - the button that will
be pressed when closing the dialog.listener
- The listener which will be notified of all button
events.Dialog
public static void setDialogFactory(DialogSupport.DialogFactory factory)
createDialog
method.
If no factory is set, the DefaultDialogFactory
will be used.factory
- the DialogFactory
implementation that will be responsible for providing dialogs.DialogSupport.DialogFactory
,
DialogSupport.DefaultDialogFactory