Example usage for com.intellij.openapi.ui DialogWrapper setModal

List of usage examples for com.intellij.openapi.ui DialogWrapper setModal

Introduction

In this page you can find the example usage for com.intellij.openapi.ui DialogWrapper setModal.

Prototype

public void setModal(boolean modal) 

Source Link

Usage

From source file:com.kiwisoft.utils.idea.PluginUtils.java

License:Open Source License

public static void showDialog(final DialogWrapper dialog, boolean wait, final boolean modal) {
    Runnable runnable = new Runnable() {
        public void run() {
            dialog.setModal(modal);
            dialog.show();/*www .  j  a va 2 s.  c  om*/
        }
    };
    if (SwingUtilities.isEventDispatchThread())
        runnable.run();
    else if (wait) {
        try {
            SwingUtilities.invokeAndWait(runnable);
        } catch (Exception e) {
            e.printStackTrace();
        }
    } else
        SwingUtilities.invokeLater(runnable);
}