package org.argeo.suite.e4.rap;
+import java.util.Map;
+
import org.argeo.cms.e4.rap.AbstractRapE4App;
+import org.argeo.cms.util.BundleResourceLoader;
+import org.eclipse.rap.e4.E4ApplicationConfig;
+import org.eclipse.rap.rwt.RWT;
+import org.eclipse.rap.rwt.application.Application;
+import org.eclipse.rap.rwt.client.WebClient;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.FrameworkUtil;
public class ArgeoOfficeRapE4App extends AbstractRapE4App {
+ private BundleContext bc = FrameworkUtil.getBundle(getClass()).getBundleContext();
public ArgeoOfficeRapE4App() {
setPageTitle("Argeo Office");
setLifeCycleUri("bundleclass://org.argeo.suite.e4.rap/org.argeo.suite.e4.rap.ArgeoSuiteLoginLifecycle");
}
+ @Override
+ protected void addEntryPoint(Application application, E4ApplicationConfig config, Map<String, String> properties) {
+ // String theme ="org.argeo.theme.argeo2.office";
+ String theme = RWT.DEFAULT_THEME_ID;
+ Bundle themeBundle = findTheme("org.argeo.theme.argeo2");
+ // application.addStyleSheet(theme, "rap/office-rwt.css", new
+ // BundleResourceLoader(themeBundle));
+ application.addStyleSheet(theme, "rap/office.css", new BundleResourceLoader(themeBundle));
+ properties.put(WebClient.THEME_ID, theme);
+ String font = "<link rel='stylesheet' href='http://fonts.googleapis.com/css?family=Source+Sans+Pro'/>";
+ properties.put(WebClient.HEAD_HTML, font);
+ super.addEntryPoint(application, config, properties);
+ }
+
+ Bundle findTheme(String symbolicName) {
+ for (Bundle b : bc.getBundles())
+ if (symbolicName.equals(b.getSymbolicName()))
+ return b;
+ throw new RuntimeException("Theme bundle " + symbolicName + " not found");
+ }
}
</toolbar>
</children>
</children>
- <children xsi:type="basic:PartStack" xmi:id="_vLza4DAVEei3AbO1ldMI0w" elementId="org.argeo.suite.e4.partstack.1" containerData="7000">
- <tags>entityEditorArea</tags>
- <children xsi:type="basic:Part" xmi:id="_n83mkDDnEeiUfOa4rxEKwQ" elementId="org.argeo.suite.e4.part.defaultDashboard" contributionURI="bundleclass://org.argeo.suite.e4/org.argeo.suite.e4.parts.DefaultDashboardEditor" label="" iconURI="platform:/plugin/org.argeo.theme.argeo2/icons/types/dashboard.png" tooltip="%dashboard">
- <toolbar xmi:id="_zlZE4EIqEeij3Nr_iRrJtw" elementId="org.argeo.suite.e4.toolbar.0">
- <children xsi:type="menu:HandledToolItem" xmi:id="_2ZdvAEIqEeij3Nr_iRrJtw" elementId="org.argeo.suite.e4.handledtoolitem." label="" iconURI="platform:/plugin/org.argeo.theme.argeo2/icons/actions/close-all.png" tooltip="%closeAll" command="_VdldQDDmEeiUfOa4rxEKwQ"/>
- </toolbar>
- </children>
- </children>
+ <children xsi:type="advanced:Placeholder" xmi:id="_UVQvIMlIEeic2PiQZ6_KRg" elementId="org.argeo.suite.e4.placeholder.1" ref="_F2pwgMlIEeic2PiQZ6_KRg"/>
</children>
</children>
<children xsi:type="advanced:Perspective" xmi:id="_bu5BYD4aEeiR-OuUuIB1Aw" elementId="org.argeo.suite.e4.perspective.folders" label="%folders" iconURI="platform:/plugin/org.argeo.theme.argeo2/icons/types/24/folder.png" tooltip="%folders">
- <children xsi:type="basic:PartStack" xmi:id="_p66bMD4aEeiR-OuUuIB1Aw" elementId="org.argeo.suite.e4.partstack.0" containerData="3000">
- <children xsi:type="basic:Part" xmi:id="_xi1k0DDzEeiUfOa4rxEKwQ" elementId="org.argeo.suite.e4.part.documents" contributionURI="bundleclass://org.argeo.connect.e4/org.argeo.documents.e4.parts.MyFilesView" label="%documents" iconURI="platform:/plugin/org.argeo.theme.argeo2/icons/types/documents.png"/>
- <children xsi:type="basic:Part" xmi:id="_dr0bwMSbEeifiPIP7QsPQg" elementId="org.argeo.suite.e4.part.search" contributionURI="bundleclass://org.argeo.connect.e4/org.argeo.documents.e4.parts.SearchDocumentsView" label="%search" iconURI="platform:/plugin/org.argeo.theme.argeo2/icons/actions/search.png"/>
- </children>
- <children xsi:type="basic:PartStack" xmi:id="__v8wAMS9EeifiPIP7QsPQg" elementId="org.argeo.suite.e4.partstack.2" containerData="7000">
- <tags>entityEditorArea</tags>
+ <children xsi:type="basic:PartSashContainer" xmi:id="__LhVQMlHEeic2PiQZ6_KRg" elementId="org.argeo.suite.e4.partsashcontainer.1" horizontal="true">
+ <children xsi:type="basic:PartStack" xmi:id="_p66bMD4aEeiR-OuUuIB1Aw" elementId="org.argeo.suite.e4.partstack.0" containerData="3000">
+ <children xsi:type="basic:Part" xmi:id="_xi1k0DDzEeiUfOa4rxEKwQ" elementId="org.argeo.suite.e4.part.documents" contributionURI="bundleclass://org.argeo.connect.e4/org.argeo.documents.e4.parts.MyFilesView" label="%documents" iconURI="platform:/plugin/org.argeo.theme.argeo2/icons/types/documents.png"/>
+ <children xsi:type="basic:Part" xmi:id="_dr0bwMSbEeifiPIP7QsPQg" elementId="org.argeo.suite.e4.part.search" contributionURI="bundleclass://org.argeo.connect.e4/org.argeo.documents.e4.parts.SearchDocumentsView" label="%search" iconURI="platform:/plugin/org.argeo.theme.argeo2/icons/actions/search.png"/>
+ </children>
+ <children xsi:type="advanced:Placeholder" xmi:id="_JYopgMlIEeic2PiQZ6_KRg" elementId="org.argeo.suite.e4.placeholder.0" ref="_F2pwgMlIEeic2PiQZ6_KRg"/>
</children>
</children>
</children>
+ <sharedElements xsi:type="basic:PartStack" xmi:id="_F2pwgMlIEeic2PiQZ6_KRg" elementId="org.argeo.suite.e4.partstack.entityEditorArea" containerData="7000">
+ <tags>entityEditorArea</tags>
+ <children xsi:type="basic:Part" xmi:id="_n83mkDDnEeiUfOa4rxEKwQ" elementId="org.argeo.suite.e4.part.defaultDashboard" contributionURI="bundleclass://org.argeo.suite.e4/org.argeo.suite.e4.parts.DefaultDashboardEditor" label="" iconURI="platform:/plugin/org.argeo.theme.argeo2/icons/types/dashboard.png" tooltip="%dashboard">
+ <toolbar xmi:id="_zlZE4EIqEeij3Nr_iRrJtw" elementId="org.argeo.suite.e4.toolbar.0">
+ <children xsi:type="menu:HandledToolItem" xmi:id="_2ZdvAEIqEeij3Nr_iRrJtw" elementId="org.argeo.suite.e4.handledtoolitem." label="" iconURI="platform:/plugin/org.argeo.theme.argeo2/icons/actions/close-all.png" tooltip="%closeAll" command="_VdldQDDmEeiUfOa4rxEKwQ"/>
+ </toolbar>
+ </children>
+ </sharedElements>
<trimBars xmi:id="_24OSADArEei3AbO1ldMI0w" elementId="org.argeo.suite.e4.trimbar.top">
<children xsi:type="menu:ToolBar" xmi:id="_JIUjADDhEeiUfOa4rxEKwQ" elementId="org.argeo.suite.e4.toolbar.standard">
<children xsi:type="menu:HandledToolItem" xmi:id="_55lzgD4cEeiR-OuUuIB1Aw" elementId="org.argeo.suite.e4.handledtoolitem.dashboard" label="%dashboard" iconURI="platform:/plugin/org.argeo.theme.argeo2/icons/types/24/dashboard.png" tooltip="%dashboard" command="__usGAD4ZEeiR-OuUuIB1Aw">