]> git.argeo.org Git - lgpl/argeo-commons.git/blob - security/eclipse/plugins/org.argeo.security.ui.application/src/main/java/org/argeo/security/ui/application/RapSecureWorkbenchWindowAdvisor.java
Implementation of requests, better handling of check in / check out process.
[lgpl/argeo-commons.git] / security / eclipse / plugins / org.argeo.security.ui.application / src / main / java / org / argeo / security / ui / application / RapSecureWorkbenchWindowAdvisor.java
1 package org.argeo.security.ui.application;
2
3 import org.apache.commons.logging.Log;
4 import org.apache.commons.logging.LogFactory;
5 import org.eclipse.swt.SWT;
6 import org.eclipse.swt.graphics.Point;
7 import org.eclipse.swt.graphics.Rectangle;
8 import org.eclipse.swt.widgets.Display;
9 import org.eclipse.ui.application.ActionBarAdvisor;
10 import org.eclipse.ui.application.IActionBarConfigurer;
11 import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
12
13 public class RapSecureWorkbenchWindowAdvisor extends
14 SecureWorkbenchWindowAdvisor {
15 private final static Log log = LogFactory
16 .getLog(RapSecureWorkbenchWindowAdvisor.class);
17
18 public RapSecureWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
19 super(configurer);
20 }
21
22 @Override
23 public ActionBarAdvisor createActionBarAdvisor(
24 IActionBarConfigurer configurer) {
25 return new SecureActionBarAdvisor(configurer, false);
26 }
27
28 public void preWindowOpen() {
29 IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
30 // configurer.setInitialSize(new Point(800, 600));
31
32 // if (log.isDebugEnabled())
33 // log.debug("CHAR ENCODING"
34 // + System.getProperty("file.encoding"));
35 configurer.setShowCoolBar(true);
36 configurer.setShowMenuBar(true);
37 configurer.setShowStatusLine(false);
38 configurer.setShowPerspectiveBar(true);
39 configurer.setTitle("Argeo Secure UI"); //$NON-NLS-1$
40 // Full screen, see
41 // http://dev.eclipse.org/newslists/news.eclipse.technology.rap/msg02697.html
42 configurer.setShellStyle(SWT.NONE);
43 Rectangle bounds = Display.getDefault().getBounds();
44 configurer.setInitialSize(new Point(bounds.width, bounds.height));
45 }
46
47 }