blob: 279f993da4db513c784c71f861119f7777afb808 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
/*******************************************************************************
* Copyright (c) 2011 Boeing.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
package org.eclipse.osee.ats.view.web;
import org.eclipse.osee.ats.api.search.AtsSearchPresenter;
import org.eclipse.osee.vaadin.widgets.HasViews;
import org.osgi.framework.Bundle;
import org.osgi.framework.FrameworkUtil;
import com.vaadin.Application;
import com.vaadin.ui.Window;
/**
* @author Shawn F. Cook
*/
@SuppressWarnings("serial")
public class AtsUiApplication extends Application {
private final AtsSearchPresenter atsBackend = AtsWebSearchPresenter_TestBackend.getInstance();
@Override
public void init() {
setTheme("osee");
@SuppressWarnings("unused")
AtsAppData sessionData = new AtsAppData(this);
AtsWindowFactory factory = new AtsWindowFactory();
HasViews viewProvider = new AtsUiViews();
Window mainWindow = factory.createNavigatableWindow(viewProvider);
setMainWindow(mainWindow);
mainWindow.setApplication(this);
}
@Override
public String getVersion() {
Bundle bundle = FrameworkUtil.getBundle(this.getClass());
return bundle.getVersion().toString();
}
public AtsSearchPresenter getAtsWebSearchPresenter() {
return atsBackend;
}
// @Override
// public Window getWindow(String name) {
// // If the window is identified by name, we are good to go
// Window w = super.getWindow(name);
//
// // If not, we must create a new window for this new browser window/tab
// if (w == null) {
//
// // Use the random name given by the framework to identify this
// // window in future
// AtsWindowFactory factory = new AtsWindowFactory();
// HasViews viewProvider = new AtsUiViews();
// Window mainWindow = factory.createNavigatableWindow(viewProvider);
// mainWindow.setName(name);
// addWindow(mainWindow);
//
// // Move to the url to remember the name in the future
// mainWindow.open(new ExternalResource(mainWindow.getURL()));
// }
//
// return w;
// }
}
|