| java.lang.Object org.netbeans.editor.DialogSupport
DialogSupport | public class DialogSupport (Code) | | DialogSupport is factory based class for creating dialogs of certain
behaviour. It is intended to be used whenever editor needs to popup a dialog.
It presents a way for changing the implementation of the dialog depending on
the enviroment the Editor is embeded in.
author: pnejedly version: 1.0 |
Inner Class :public static interface DialogFactory | |
Method Summary | |
public static Dialog | createDialog(String title, JPanel panel, boolean modal, JButton[] buttons, boolean sidebuttons, int defaultIndex, int cancelIndex, ActionListener listener) The method for creating a dialog with specified properties.
Parameters: title - The title of created dialog. Parameters: panel - The content of the dialog to be displayed. Parameters: modal - Whether the dialog should be modal. Parameters: buttons - The array of JButtons to be added to the dialog. Parameters: sidebuttons - The buttons could be placed under the panel (false), or on theright side of the panel (true). Parameters: defaultIndex - The index of default button in the buttons array, if index <0 , no default button is set. Parameters: cancelIndex - The index about cancel button - the button that will bepressed when closing the dialog. Parameters: listener - The listener which will be notified of all button events. | public static void | setDialogFactory(DialogFactory factory) The method for setting custom factory for creating dialogs via the
DialogSupport.createDialog(java.lang.String,javax.swing.JPanel,boolean,javax.swing.JButton[],boolean,int,int,java.awt.event.ActionListener) createDialog method. |
createDialog | public static Dialog createDialog(String title, JPanel panel, boolean modal, JButton[] buttons, boolean sidebuttons, int defaultIndex, int cancelIndex, ActionListener listener)(Code) | | The method for creating a dialog with specified properties.
Parameters: title - The title of created dialog. Parameters: panel - The content of the dialog to be displayed. Parameters: modal - Whether the dialog should be modal. Parameters: buttons - The array of JButtons to be added to the dialog. Parameters: sidebuttons - The buttons could be placed under the panel (false), or on theright side of the panel (true). Parameters: defaultIndex - The index of default button in the buttons array, if index <0 , no default button is set. Parameters: cancelIndex - The index about cancel button - the button that will bepressed when closing the dialog. Parameters: listener - The listener which will be notified of all button events. newly created Dialog |
|
|