summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/gui/core/LoginComposite.java
diff options
context:
space:
mode:
authorStephan Schwaer2015-06-26 16:05:49 +0200
committerStephan Schwaer2015-06-26 16:05:49 +0200
commit0131684b7f4b422de49494efe0c9e45dc3359fed (patch)
tree16ec5ec9ee9a628afaee9e7b949b99f902b2867d /dozentenmodul/src/main/java/gui/core/LoginComposite.java
parentAdded GUI for Login (diff)
downloadtutor-module-0131684b7f4b422de49494efe0c9e45dc3359fed.tar.gz
tutor-module-0131684b7f4b422de49494efe0c9e45dc3359fed.tar.xz
tutor-module-0131684b7f4b422de49494efe0c9e45dc3359fed.zip
Added disclaimer, main window and vmware info windows. Fixed some layout.
Diffstat (limited to 'dozentenmodul/src/main/java/gui/core/LoginComposite.java')
-rw-r--r--dozentenmodul/src/main/java/gui/core/LoginComposite.java69
1 files changed, 38 insertions, 31 deletions
diff --git a/dozentenmodul/src/main/java/gui/core/LoginComposite.java b/dozentenmodul/src/main/java/gui/core/LoginComposite.java
index 38449b2f..65da634d 100644
--- a/dozentenmodul/src/main/java/gui/core/LoginComposite.java
+++ b/dozentenmodul/src/main/java/gui/core/LoginComposite.java
@@ -1,4 +1,5 @@
package gui.core;
+
import gui.GuiManager;
import org.eclipse.swt.SWT;
@@ -31,11 +32,11 @@ public class LoginComposite extends Composite {
super(mainShell, SWT.NO_BACKGROUND);
mainShell.setText("Dozmod - Login");
- // Left authentication selection and right loginmask
+ // left authentication selection and right loginmask
GridLayout gridLayout = new GridLayout(2, true);
this.setLayout(gridLayout);
- //Load the needed Picture
+ // load the needed Picture
loadImage();
Label titlePicture = new Label(this, SWT.NONE);
@@ -45,31 +46,37 @@ public class LoginComposite extends Composite {
gridData.horizontalAlignment = SWT.CENTER;
titlePicture.setLayoutData(gridData);
- // Group for the authentication method.
+ // group for the authentication method.
Group authGroup = new Group(this, SWT.NONE);
authGroup.setText("Authentifizierungsart");
gridLayout = new GridLayout();
gridLayout.numColumns = 1;
authGroup.setLayout(gridLayout);
- gridData = new GridData(GridData.FILL, GridData.CENTER, false, false);
+ gridData = new GridData(GridData.FILL, GridData.FILL, false, false);
gridData.heightHint = 150;
authGroup.setLayoutData(gridData);
- // Add the radio buttons
+ // add the radio buttons
Button[] authButtons = new Button[3];
authButtons[0] = new Button(authGroup, SWT.RADIO);
authButtons[0].setSelection(true);
authButtons[0].setText("Authentifizierung über bwIDM");
+ gridData = new GridData(GridData.FILL, GridData.FILL, true, true);
+ authButtons[0].setLayoutData(gridData);
authButtons[1] = new Button(authGroup, SWT.RADIO);
authButtons[1].setText("Test-Zugang mit festem Benutzernamen");
+ gridData = new GridData(GridData.FILL, GridData.FILL, true, true);
+ authButtons[1].setLayoutData(gridData);
authButtons[2] = new Button(authGroup, SWT.RADIO);
authButtons[2].setText("Direkte Verbindung zum Satteliten");
+ gridData = new GridData(GridData.FILL, GridData.FILL, true, true);
+ authButtons[2].setLayoutData(gridData);
- // Group for the login mask
+ // group for the login mask
final Group loginGroup = new Group(this, SWT.NONE);
loginGroup.setText("Zugangsdaten");
gridLayout = new GridLayout();
@@ -85,6 +92,7 @@ public class LoginComposite extends Composite {
final Combo IdPCombo = new Combo(loginGroup, SWT.DROP_DOWN | SWT.READ_ONLY);
+ IdPCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
IdPCombo.add("Ubuntu");
@@ -107,19 +115,18 @@ public class LoginComposite extends Composite {
Button saveUsernameCheck = new Button(loginGroup, SWT.CHECK);
saveUsernameCheck.setText("Benutzername speichern");
- // Actions of the login button
+ // actions of the login button
loginButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
System.out.println("BAM!");
- //loginComposite.dispose();
- mainShell.setText("Login?");
+ GuiManager.addContent(new DisclaimerComposite(mainShell));
}
});
-
- // For save username checkbox.
+
+ // for save username checkbox.
saveUsernameCheck.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
@@ -127,16 +134,16 @@ public class LoginComposite extends Composite {
}
});
- // Selecting the "Authentifizierung über bwIDM" radio button
- authButtons[0].addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- IdPText.setVisible(true);
- IdPCombo.setVisible(true);
- }
- });
-
- // Selecting the "Test-Zugang über bwIDM" radio button
+ // selecting the "Authentifizierung über bwIDM" radio button
+ authButtons[0].addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ IdPText.setVisible(true);
+ IdPCombo.setVisible(true);
+ }
+ });
+
+ // selecting the "Test-Zugang über bwIDM" radio button
authButtons[1].addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
@@ -147,17 +154,17 @@ public class LoginComposite extends Composite {
});
authButtons[2].setEnabled(false);
- // Selecting the "Direkte Verbindung zum Satteliten" radio button
- authButtons[2].addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- IdPText.setVisible(false);
- IdPCombo.setVisible(false);
- }
- });
+ // selecting the "Direkte Verbindung zum Satteliten" radio button
+ authButtons[2].addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ IdPText.setVisible(false);
+ IdPCombo.setVisible(false);
+ }
+ });
}
-
-
+
+
private void loadImage(){
try {