当前页面:
在线文档首页 >
NetBeans API Javadoc (Current Development Version)
DialogSupport.DialogFactory (Editor Library) - NetBeans API Javadoc (Current Development Version)
org.netbeans.editor
Interface DialogSupport.DialogFactory
- Enclosing class:
- DialogSupport
public static interface DialogSupport.DialogFactory
DialogFactory implementation is a class responsible for providing
proper implementation of Dialog containing required widgets.
It can provide the dialog itself or delegate the functionality
to another piece of code, e.g some windowing system.
createDialog
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.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 of cancel button - the button that will
be pressed when closing the dialog.listener
- The listener which will be notified of all button
events.
- Returns:
- newly created
Dialog