]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.ui/src/org/simantics/ui/auth/LoginDialog.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.ui / src / org / simantics / ui / auth / LoginDialog.java
index a82823f0568692c6c15b4c711d5eb0b316575376..b31782014a864b06e2428ccb62bd2e049f69df63 100644 (file)
@@ -1,89 +1,89 @@
-/*******************************************************************************\r
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
- * in Industry THTH ry.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- *     VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
-package org.simantics.ui.auth;\r
-\r
-import org.eclipse.jface.dialogs.IDialogSettings;\r
-import org.eclipse.jface.dialogs.TrayDialog;\r
-import org.eclipse.jface.layout.GridDataFactory;\r
-import org.eclipse.swt.SWT;\r
-import org.eclipse.swt.graphics.Point;\r
-import org.eclipse.swt.widgets.Composite;\r
-import org.eclipse.swt.widgets.Control;\r
-import org.eclipse.swt.widgets.Shell;\r
-import org.simantics.ui.auth.model.LoginModel;\r
-\r
-/**\r
- * @author Tuukka Lehtonen\r
- */\r
-public class LoginDialog extends TrayDialog {\r
-\r
-    private static final String LOGIN_DIALOG = "LoginDialog"; //$NON-NLS-1$\r
-\r
-    private IDialogSettings     dialogBoundsSettings;\r
-\r
-    private LoginComposite      c;\r
-\r
-    private final LoginModel          model;\r
-\r
-    protected LoginDialog(Shell parentShell, IDialogSettings settings, LoginModel model) {\r
-        super(parentShell);\r
-        this.model = model;\r
-\r
-        dialogBoundsSettings = settings.getSection(LOGIN_DIALOG);\r
-        if (dialogBoundsSettings == null)\r
-            dialogBoundsSettings = settings.addNewSection(LOGIN_DIALOG);\r
-    }\r
-\r
-    @Override\r
-    protected int getShellStyle() {\r
-        return super.getShellStyle() /*| SWT.RESIZE */;\r
-    }\r
-\r
-    @Override\r
-    protected void configureShell(Shell newShell) {\r
-        newShell.setText("Login - " + model.getServer().getName());\r
-        super.configureShell(newShell);\r
-    }\r
-\r
-    @Override\r
-    protected Control createDialogArea(Composite parent) {\r
-        Composite composite = (Composite) super.createDialogArea(parent);\r
-\r
-        c = new LoginComposite(composite, SWT.NONE, model);\r
-\r
-        GridDataFactory.fillDefaults().grab(true, false).applyTo(c);\r
-\r
-        applyDialogFont(composite);\r
-\r
-        return composite;\r
-    }\r
-\r
-    @Override\r
-    protected IDialogSettings getDialogBoundsSettings() {\r
-        return dialogBoundsSettings;\r
-    }\r
-\r
-    @Override\r
-    protected Point getInitialSize() {\r
-        Point defaultSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT, true);\r
-        Point result = super.getInitialSize();\r
-        if (defaultSize.equals(result))\r
-            return new Point(400, 220);\r
-        return result;\r
-    }\r
-\r
-    @Override\r
-    protected void createButtonsForButtonBar(Composite parent) {\r
-        super.createButtonsForButtonBar(parent);\r
-    }\r
-\r
-}\r
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Association for Decentralized Information Management
+ * in Industry THTH ry.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     VTT Technical Research Centre of Finland - initial API and implementation
+ *******************************************************************************/
+package org.simantics.ui.auth;
+
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.dialogs.TrayDialog;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+import org.simantics.ui.auth.model.LoginModel;
+
+/**
+ * @author Tuukka Lehtonen
+ */
+public class LoginDialog extends TrayDialog {
+
+    private static final String LOGIN_DIALOG = "LoginDialog"; //$NON-NLS-1$
+
+    private IDialogSettings     dialogBoundsSettings;
+
+    private LoginComposite      c;
+
+    private final LoginModel          model;
+
+    protected LoginDialog(Shell parentShell, IDialogSettings settings, LoginModel model) {
+        super(parentShell);
+        this.model = model;
+
+        dialogBoundsSettings = settings.getSection(LOGIN_DIALOG);
+        if (dialogBoundsSettings == null)
+            dialogBoundsSettings = settings.addNewSection(LOGIN_DIALOG);
+    }
+
+    @Override
+    protected int getShellStyle() {
+        return super.getShellStyle() /*| SWT.RESIZE */;
+    }
+
+    @Override
+    protected void configureShell(Shell newShell) {
+        newShell.setText("Login - " + model.getServer().getName());
+        super.configureShell(newShell);
+    }
+
+    @Override
+    protected Control createDialogArea(Composite parent) {
+        Composite composite = (Composite) super.createDialogArea(parent);
+
+        c = new LoginComposite(composite, SWT.NONE, model);
+
+        GridDataFactory.fillDefaults().grab(true, false).applyTo(c);
+
+        applyDialogFont(composite);
+
+        return composite;
+    }
+
+    @Override
+    protected IDialogSettings getDialogBoundsSettings() {
+        return dialogBoundsSettings;
+    }
+
+    @Override
+    protected Point getInitialSize() {
+        Point defaultSize = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
+        Point result = super.getInitialSize();
+        if (defaultSize.equals(result))
+            return new Point(400, 220);
+        return result;
+    }
+
+    @Override
+    protected void createButtonsForButtonBar(Composite parent) {
+        super.createButtonsForButtonBar(parent);
+    }
+
+}