public abstract class DialogDisplayer extends Object
Modifier | Constructor and Description |
---|---|
protected |
DialogDisplayer()
Subclass constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract Dialog |
createDialog(DialogDescriptor descriptor)
Get a new standard dialog.
|
Dialog |
createDialog(DialogDescriptor descriptor,
Frame parent)
Same as #createDialog(org.openide.DialogDescriptor) except that it's possible
to specify dialog's parent Frame window.
|
static DialogDisplayer |
getDefault()
Get the default dialog displayer.
|
abstract Object |
notify(NotifyDescriptor descriptor)
Notify the user of something in a message box, possibly with feedback.
|
void |
notifyLater(NotifyDescriptor descriptor)
Notify the user of something in a message box, possibly with feedback,
this method method may be called
from any thread.
|
public static DialogDisplayer getDefault()
public abstract Object notify(NotifyDescriptor descriptor)
To support both GUI and non-GUI use, this method may be called from any thread (providing you are not holding any locks), and will block the caller's thread. In GUI mode, it will be run in the AWT event thread automatically. If you wish to hold locks, or do not need the result object immediately or at all, please make this call asynchronously (e.g. from the request processor).
descriptor
- description of the notificationpublic void notifyLater(NotifyDescriptor descriptor)
later, usually when AWT thread is empty and can handle the request.
Implementation note: Since version 7.3, implementation improved to work also before main window is opened. For example: When method is called from ModuleInstall.restored, then modal dialog is opened and blocks main window until dialog is closed. Typical use case is login dialog.
descriptor
- description of the notificationpublic abstract Dialog createDialog(DialogDescriptor descriptor)
Do not cache the resulting dialog if it is modal and try to reuse it! Always create a new dialog using this method if you need to show a dialog again. Otherwise previously closed windows can reappear.
descriptor
- general description of the dialogpublic Dialog createDialog(DialogDescriptor descriptor, Frame parent)
descriptor
- general description of the dialogparent
- Dialgo parent frame.