diff options
author | Simon Rettberg | 2015-07-10 17:02:23 +0200 |
---|---|---|
committer | Simon Rettberg | 2015-07-10 17:02:23 +0200 |
commit | e500a8530d8ba8a79413e6476005f628ed36c35b (patch) | |
tree | 36610e6203467187d8a0e1e3c7dcf81b98653400 /dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LoginWindowLayout.java | |
parent | [client] fix missing setControl in ImageMetaDataPageLayout (diff) | |
download | tutor-module-e500a8530d8ba8a79413e6476005f628ed36c35b.tar.gz tutor-module-e500a8530d8ba8a79413e6476005f628ed36c35b.tar.xz tutor-module-e500a8530d8ba8a79413e6476005f628ed36c35b.zip |
[client] Fix indentation
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LoginWindowLayout.java')
-rw-r--r-- | dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LoginWindowLayout.java | 44 |
1 files changed, 25 insertions, 19 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LoginWindowLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LoginWindowLayout.java index 48ae60d2..683780c9 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LoginWindowLayout.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/layout/LoginWindowLayout.java @@ -24,28 +24,39 @@ public abstract class LoginWindowLayout extends Composite { private final int id; private final String tag; + private LOGIN_TYPE(final int id, final String tag) { this.id = id; this.tag = tag; } - public int getId() { return this.id; } - public String getTag() { return this.tag; } + + public int getId() { + return this.id; + } + + public String getTag() { + return this.tag; + } public static LOGIN_TYPE getEnum(String tag) { - switch(tag) { - case "bwidm": return LOGIN_TYPE.BWIDM; - case "bwlp": return LOGIN_TYPE.BWLP; - case "sat": return LOGIN_TYPE.SAT; - default: return null; + switch (tag) { + case "bwidm": + return LOGIN_TYPE.BWIDM; + case "bwlp": + return LOGIN_TYPE.BWLP; + case "sat": + return LOGIN_TYPE.SAT; + default: + return null; } } } + // authentication method to use for login attempts protected LOGIN_TYPE loginType = null; private Image titleImage; - // textfields for the username/password protected Text usernameText; protected Text passwordText; @@ -64,9 +75,9 @@ public abstract class LoginWindowLayout extends Composite { /** * Create a new login composite - * + * * @param mainShell - * The shell it should be added to + * The shell it should be added to */ public LoginWindowLayout(final Shell mainShell) { super(mainShell, SWT.NONE); @@ -88,7 +99,6 @@ public abstract class LoginWindowLayout extends Composite { gridData.horizontalAlignment = SWT.CENTER; titlePicture.setLayoutData(gridData); - // group for the authentication method. // groups have borders and a title Group authGroup = new Group(this, SWT.NONE); @@ -131,18 +141,15 @@ public abstract class LoginWindowLayout extends Composite { idpText.setText("IdP:"); idpCombo = new Combo(loginGroup, SWT.DROP_DOWN | SWT.READ_ONLY); - idpCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, - false)); + idpCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false)); new Label(loginGroup, SWT.NONE).setText("Benutzername:"); usernameText = new Text(loginGroup, SWT.SINGLE | SWT.BORDER); - usernameText.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, - true, false)); + usernameText.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false)); new Label(loginGroup, SWT.NONE).setText("Passwort:"); passwordText = new Text(loginGroup, SWT.SINGLE | SWT.BORDER | SWT.PASSWORD); - passwordText.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, - true, false)); + passwordText.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false)); // login button loginButton = new Button(loginGroup, SWT.PUSH); loginButton.setText("Login"); @@ -157,8 +164,7 @@ public abstract class LoginWindowLayout extends Composite { // this way, we can be sure to get an image // (since the ResourceLoader always returns an image, // even if it cannot load the specified one). - titleImage = new Image(Gui.display, getClass() - .getResourceAsStream("/img/Logo_bwLehrpool.png")); + titleImage = new Image(Gui.display, getClass().getResourceAsStream("/img/Logo_bwLehrpool.png")); ImageData imgData = titleImage.getImageData(); imgData = imgData.scaledTo(imgData.width / 5, imgData.height / 5); titleImage = new Image(Gui.display, imgData); |