]>
git.argeo.org Git - lgpl/argeo-commons.git/blob - org.argeo.cms.swt/src/org/argeo/cms/swt/auth/CmsLoginShell.java
1 package org
.argeo
.cms
.swt
.auth
;
3 import org
.argeo
.api
.cms
.CmsView
;
4 import org
.argeo
.cms
.swt
.CmsSwtUtils
;
5 import org
.eclipse
.swt
.SWT
;
6 import org
.eclipse
.swt
.widgets
.Control
;
7 import org
.eclipse
.swt
.widgets
.Display
;
8 import org
.eclipse
.swt
.widgets
.Shell
;
10 /** The site-related user menu */
11 public class CmsLoginShell
extends CmsLogin
{
12 private final Shell shell
;
14 public CmsLoginShell(CmsView cmsView
) {
16 shell
= createShell();
20 /** To be overridden. */
21 protected Shell
createShell() {
22 Shell shell
= new Shell(Display
.getCurrent(), SWT
.NO_TRIM
);
23 shell
.setMaximized(true);
27 /** To be overridden. */
29 CmsSwtUtils
.style(shell
, CMS_USER_MENU
);
34 protected boolean login() {
35 boolean success
= false;
37 success
= super.login();
43 for (Control child
: shell
.getChildren())
53 protected void logout() {
58 protected void closeShell() {
59 if (!shell
.isDisposed()) {
65 public Shell
getShell() {
69 public void createUi(){