1 package org
.argeo
.suite
.e4
.rap
;
5 import org
.argeo
.cms
.e4
.rap
.AbstractRapE4App
;
6 import org
.argeo
.cms
.util
.BundleResourceLoader
;
7 import org
.eclipse
.rap
.e4
.E4ApplicationConfig
;
8 import org
.eclipse
.rap
.rwt
.RWT
;
9 import org
.eclipse
.rap
.rwt
.application
.Application
;
10 import org
.eclipse
.rap
.rwt
.client
.WebClient
;
11 import org
.osgi
.framework
.Bundle
;
12 import org
.osgi
.framework
.BundleContext
;
13 import org
.osgi
.framework
.FrameworkUtil
;
15 public class ArgeoOfficeRapE4App
extends AbstractRapE4App
{
16 private BundleContext bc
= FrameworkUtil
.getBundle(getClass()).getBundleContext();
18 public ArgeoOfficeRapE4App() {
19 setPageTitle("Argeo Office");
20 setE4Xmi("org.argeo.suite.e4/e4xmi/argeo-office.e4xmi");
22 setLifeCycleUri("bundleclass://org.argeo.suite.e4.rap/org.argeo.suite.e4.rap.ArgeoSuiteLoginLifecycle");
26 protected void addEntryPoint(Application application
, E4ApplicationConfig config
, Map
<String
, String
> properties
) {
27 // String theme ="org.argeo.theme.argeo2.office";
28 String theme
= RWT
.DEFAULT_THEME_ID
;
29 Bundle themeBundle
= findTheme("org.argeo.theme.argeo2");
30 // application.addStyleSheet(theme, "rap/office-rwt.css", new
31 // BundleResourceLoader(themeBundle));
32 application
.addStyleSheet(theme
, "rap/office.css", new BundleResourceLoader(themeBundle
));
33 properties
.put(WebClient
.THEME_ID
, theme
);
34 String font
= "<link rel='stylesheet' href='http://fonts.googleapis.com/css?family=Source+Sans+Pro'/>";
35 properties
.put(WebClient
.HEAD_HTML
, font
);
36 super.addEntryPoint(application
, config
, properties
);
39 Bundle
findTheme(String symbolicName
) {
40 for (Bundle b
: bc
.getBundles())
41 if (symbolicName
.equals(b
.getSymbolicName()))
43 throw new RuntimeException("Theme bundle " + symbolicName
+ " not found");