Example usage for com.vaadin.ui Component getUI

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

Introduction

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

Prototype

@Override
public UI getUI();

Source Link

Document

Gets the UI the component is attached to.

Usage

From source file:org.lunifera.runtime.web.vaadin.databinding.AbstractComponentValueProperty.java

License:Open Source License

public IVaadinComponentObservableValue observe(Component widget) {
    return (IVaadinComponentObservableValue) observe(VaadinObservables.getRealm(widget.getUI()), widget);
}

From source file:org.lunifera.runtime.web.vaadin.databinding.VaadinObservables.java

License:Open Source License

/**
 * Returns the UI of the widget or the current UI.
 * //from ww  w.  jav  a2 s  .co m
 * @param widget
 * @return
 */
public static UI getUI(Component widget) {
    UI ui = widget != null ? widget.getUI() : null;
    return ui != null ? ui : UI.getCurrent();
}

From source file:org.lunifera.runtime.web.vaadin.databinding.VaadinValueProperty.java

License:Open Source License

public IVaadinComponentObservableValue observe(Component component) {
    return (IVaadinComponentObservableValue) observe(VaadinObservables.getRealm(component.getUI()), component);
}

From source file:uk.q3c.krail.core.push.DefaultBroadcaster.java

License:Apache License

@Override
public synchronized Broadcaster broadcast(final String group, final String message, Component sender) {
    checkNotNull(sender);//from   w w  w.j ava  2  s.  c  o  m
    ScopedUI scopedUI = (ScopedUI) sender.getUI();
    return broadcast(group, message, scopedUI.getInstanceKey());
}