org.openide.dialogs 7.6

org.openide
Class DialogDisplayer

java.lang.Object
  extended by org.openide.DialogDisplayer

public abstract class DialogDisplayer
extends Object

Permits dialogs to be displayed.

Since:
3.14

Constructor Summary
protected DialogDisplayer()
          Subclass constructor.
 
Method Summary
abstract  Dialog createDialog(DialogDescriptor descriptor)
          Get a new standard dialog.
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DialogDisplayer

protected DialogDisplayer()
Subclass constructor.

Method Detail

getDefault

public static DialogDisplayer getDefault()
Get the default dialog displayer.

Returns:
the default instance from lookup

notify

public abstract Object notify(NotifyDescriptor descriptor)
Notify the user of something in a message box, possibly with feedback.

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).

Parameters:
descriptor - description of the notification
Returns:
the option that caused the message box to be closed

notifyLater

public 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. The thread will return immediately and the dialog will be shown 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.

Parameters:
descriptor - description of the notification
Since:
7.0

createDialog

public abstract Dialog createDialog(DialogDescriptor descriptor)
Get a new standard dialog. The dialog is designed and created as specified in the parameter. Anyone who wants a dialog with standard buttons and standard behavior should use this method.

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.

Parameters:
descriptor - general description of the dialog
Returns:
the new dialog

org.openide.dialogs 7.6

Built on May 30 2008.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.