Example usage for com.vaadin.ui Window isModal

List of usage examples for com.vaadin.ui Window isModal

Introduction

In this page you can find the example usage for com.vaadin.ui Window isModal.

Prototype

public boolean isModal() 

Source Link

Usage

From source file:com.haulmont.cuba.web.exception.DefaultExceptionHandler.java

License:Apache License

protected void showDialog(App app, Throwable exception) {
    Throwable rootCause = ExceptionUtils.getRootCause(exception);
    if (rootCause == null) {
        rootCause = exception;//from   w  ww.  j  a  v  a 2 s . c o m
    }
    ExceptionDialog dialog = new ExceptionDialog(rootCause);
    AppUI ui = app.getAppUI();
    for (Window window : ui.getWindows()) {
        if (window.isModal()) {
            dialog.setModal(true);
            break;
        }
    }
    ui.addWindow(dialog);
    dialog.focus();
}