Example usage for com.vaadin.ui Window getUI

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

Introduction

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

Prototype

@Override
public UI getUI() 

Source Link

Document

Finds a UI ancestor of this connector.

Usage

From source file:com.garyclayburg.vconsole.TargetWindows.java

License:Open Source License

void populateTarget(User selectedUser, String entitledTarget) {
    Window window = targetWindows.get(entitledTarget);
    if (window != null) {
        UI ui = window.getUI();
        if (ui != null) {
            VaadinSession session = ui.getSession();
            if (session != null) {
                session.getLockInstance().lock();
                try {
                    VerticalLayout windowContent = populateTargetWindowData(selectedUser, entitledTarget);
                    window.setContent(windowContent);

                } finally {
                    session.getLockInstance().unlock();
                }//  www  . j  a va 2s .co m
            }
        }
    }
}

From source file:org.jdal.vaadin.ui.FormUtils.java

License:Apache License

/**
 * Closes a sub Window/*from  w w  w.j  a  v a  2  s  .  c o  m*/
 * @param window Window to close
 */
public static void closeWindow(Window window) {
    window.getUI().removeWindow(window);
}