| /******************************************************************************* |
| * Copyright (c) 2012, 2014 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany) |
| * |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License 2.0 |
| * which accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Contributors: |
| * Florian Pirchner - initial API and implementation |
| * |
| *******************************************************************************/ |
| package org.eclipse.osbp.vaaclipse.addons.app.common; |
| |
| import org.eclipse.osbp.vaaclipse.addons.app.VaadinE4Application; |
| import org.eclipse.osbp.vaaclipse.addons.app.webapp.VaadinUI; |
| |
| import com.vaadin.server.UIClassSelectionEvent; |
| import com.vaadin.server.UICreateEvent; |
| import com.vaadin.server.UIProvider; |
| import com.vaadin.ui.UI; |
| |
| /** |
| * The Class OSGiUIProvider. |
| */ |
| @SuppressWarnings("serial") |
| public class OSGiUIProvider extends UIProvider { |
| |
| /** |
| * Instantiates a new OS gi ui provider. |
| */ |
| public OSGiUIProvider() { |
| super(); |
| } |
| |
| /* (non-Javadoc) |
| * @see com.vaadin.server.UIProvider#getUIClass(com.vaadin.server.UIClassSelectionEvent) |
| */ |
| @Override |
| public Class<? extends UI> getUIClass(UIClassSelectionEvent event) { |
| return VaadinUI.class; |
| } |
| |
| /* (non-Javadoc) |
| * @see com.vaadin.server.UIProvider#createInstance(com.vaadin.server.UICreateEvent) |
| */ |
| @Override |
| public UI createInstance(UICreateEvent event) { |
| return new VaadinUI(); |
| } |
| |
| /* (non-Javadoc) |
| * @see com.vaadin.server.UIProvider#getTheme(com.vaadin.server.UICreateEvent) |
| */ |
| @Override |
| public String getTheme(UICreateEvent event) { |
| return VaadinE4Application.getInstance().getCssTheme(); |
| } |
| } |