]>
git.argeo.org Git - lgpl/argeo-commons.git/blob - swt/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
.CmsContext
;
4 import org
.argeo
.api
.cms
.ux
.CmsView
;
5 import org
.argeo
.cms
.swt
.CmsSwtUtils
;
6 import org
.eclipse
.swt
.SWT
;
7 import org
.eclipse
.swt
.widgets
.Control
;
8 import org
.eclipse
.swt
.widgets
.Display
;
9 import org
.eclipse
.swt
.widgets
.Shell
;
11 /** The site-related user menu */
12 public class CmsLoginShell
extends CmsLogin
{
13 private final Shell shell
;
15 public CmsLoginShell(CmsView cmsView
, CmsContext cmsContext
) {
16 super(cmsView
, cmsContext
);
17 shell
= createShell();
21 /** To be overridden. */
22 protected Shell
createShell() {
23 Shell shell
= new Shell(Display
.getCurrent(), SWT
.NO_TRIM
);
24 shell
.setMaximized(true);
28 /** To be overridden. */
30 CmsSwtUtils
.style(shell
, CMS_USER_MENU
);
35 protected boolean login() {
36 boolean success
= false;
38 success
= super.login();
44 for (Control child
: shell
.getChildren())
54 protected void logout() {
59 protected void closeShell() {
60 if (!shell
.isDisposed()) {
66 public Shell
getShell() {
70 public void createUi() {