]>
git.argeo.org Git - gpl/argeo-suite.git/blob - org.argeo.suite.workbench.rap/src/org/argeo/suite/workbench/rap/AsSecureEntryPoint.java
1 package org
.argeo
.suite
.workbench
.rap
;
3 import org
.argeo
.cms
.ui
.workbench
.rap
.RapWorkbenchAdvisor
;
4 import org
.argeo
.cms
.ui
.workbench
.rap
.RapWorkbenchLogin
;
5 import org
.argeo
.cms
.util
.CmsUtils
;
6 import org
.argeo
.cms
.widgets
.auth
.CmsLogin
;
7 import org
.argeo
.eclipse
.ui
.EclipseUiUtils
;
8 import org
.eclipse
.swt
.SWT
;
9 import org
.eclipse
.swt
.layout
.GridData
;
10 import org
.eclipse
.swt
.layout
.GridLayout
;
11 import org
.eclipse
.swt
.widgets
.Composite
;
12 import org
.eclipse
.swt
.widgets
.Label
;
15 * This class controls all aspects of the application's execution and is
16 * contributed through the plugin.xml.
18 public class AsSecureEntryPoint
extends RapWorkbenchLogin
{
20 /** Override to provide an application specific workbench advisor */
21 protected RapWorkbenchAdvisor
createRapWorkbenchAdvisor(String username
) {
22 return new AsWorkbenchAdvisor(username
);
25 protected void createLoginPage(Composite parent
, CmsLogin login
) {
26 parent
.setLayout(EclipseUiUtils
.noSpaceGridLayout());
29 Composite bodyCmp
= new Composite(parent
, SWT
.NO_FOCUS
);
30 bodyCmp
.setLayoutData(EclipseUiUtils
.fillAll());
31 GridLayout gl
= new GridLayout();
34 bodyCmp
.setLayout(gl
);
37 Label headerLbl
= new Label(bodyCmp
, SWT
.WRAP
);
38 CmsUtils
.markup(headerLbl
);
39 // Images are declared via the resources extension point in plugin.xml
40 String headerStr
= "<a href=\"http://argeo.org\" "
41 + "title=\"Smart Data Productivity Suite by Argeo\" target=\"_blank\"> "
42 + "<img src=\"/img/logo-argeo.png\" width=\"200\" height=\"200\"></img> " + "</a>";
43 headerLbl
.setText(headerStr
);
44 GridData gd
= new GridData(SWT
.LEFT
, SWT
.CENTER
, true, false);
45 headerLbl
.setLayoutData(gd
);
48 Label titleLbl
= new Label(bodyCmp
, SWT
.WRAP
| SWT
.CENTER
);
49 CmsUtils
.markup(titleLbl
);
50 String titleStr
= "<big> Please sign in to your personal dashboard</big>";
51 titleLbl
.setText(titleStr
);
52 gd
= new GridData(SWT
.CENTER
, SWT
.BOTTOM
, false, false);
53 gd
.verticalIndent
= 15;
54 titleLbl
.setLayoutData(gd
);
57 Composite loginCmp
= login
.createCredentialsBlock(bodyCmp
);
58 gd
= new GridData(SWT
.CENTER
, SWT
.TOP
, true, true);
60 gd
.verticalIndent
= 15;
61 loginCmp
.setLayoutData(gd
);
64 // Label footerLbl = new Label(bodyCmp, SWT.WRAP | SWT.CENTER);
65 // CmsUtils.markup(footerLbl);
66 // String footerStr = "<small>SDPS is a private service. <br/>"
67 // + " Please <a href=\"mailto:contact@argeo.org\">contact us</a> if you
68 // have any question.</small>";
69 // footerLbl.setText(footerStr);
70 // footerLbl.setLayoutData(EclipseUiUtils.fillWidth());