| java.lang.Object org.netbeans.modules.editor.lib2.DialogSupport
DialogSupport | final 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 |
Method Summary | |
public 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 the right 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 willbe pressed when closing the dialog. Parameters: listener - The listener which will be notified of all buttonevents. | public static synchronized DialogSupport | getInstance() | public void | setExternalDialogFactory(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 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 the right 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 willbe pressed when closing the dialog. Parameters: listener - The listener which will be notified of all buttonevents. newly created Dialog |
|
|