package de.afbb.bibo.ui.dialog;

import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;

public class LoginDialog extends Dialog {

	public LoginDialog(final Shell parentShell) {
		super(parentShell);
		// TODO Auto-generated constructor stub
	}

	@Override
	protected Control createDialogArea(final Composite parent) {
		super.createDialogArea(parent);
		final Composite composite = new Composite(parent, SWT.NONE);
		composite.setLayout(new GridLayout(2, false));
		composite.setLayoutData(new GridData(SWT.DEFAULT, SWT.DEFAULT, true, true, 1, 1));
		final Label name = new Label(composite, SWT.DEFAULT);
		name.setLayoutData(new GridData(SWT.DEFAULT, SWT.DEFAULT, true, true, 1, 1));
		name.setText("Name");
		final Text textName = new Text(composite, SWT.DEFAULT);
		textName.setLayoutData(new GridData(SWT.DEFAULT, SWT.DEFAULT, true, true, 1, 1));
		final Label psw = new Label(composite, SWT.DEFAULT);
		psw.setLayoutData(new GridData(SWT.DEFAULT, SWT.DEFAULT, true, true, 1, 1));
		psw.setText("Passwort");
		final Text textPsw = new Text(composite, SWT.DEFAULT | SWT.PASSWORD);
		textPsw.setLayoutData(new GridData(SWT.DEFAULT, SWT.DEFAULT, true, true, 1, 1));
		composite.pack();
		return composite;
	}

}

@@ -61,16 +61,25 @@
 dialogs.
+TitleArea
 Dialog;%0D
@@ -427,16 +427,25 @@
 extends 
+TitleArea
 Dialog %7B
@@ -448,16 +448,76 @@
 og %7B%0D%0A%0D%0A
+%09private Text lastNameText;%0D%0A%09private Text txtFirstName;%0D%0A%0D%0A
 %09public 
@@ -584,48 +584,102 @@
 ;%0D%0A%09
-%09// TODO Auto-generated constructor stub
+%7D%0D%0A%0D%0A%09@Override%0D%0A%09public void create() %7B%0D%0A%09%09super.create();%0D%0A%09%09setTitle(%22Benutzer-Anmeldung%22);
 %0D%0A%09%7D
@@ -755,24 +755,59 @@
 arent) %7B%0D%0A%09%09
+final Composite area = (Composite) 
 super.create
@@ -847,23 +847,23 @@
 osite co
-mposite
+ntainer
  = new C
@@ -871,22 +871,20 @@
 mposite(
-p
 are
-nt
+a
 , SWT.NO
@@ -897,65 +897,15 @@
 %09%09co
-mposite.setLayout(new GridLayout(2, false));%0D%0A%09%09composite
+ntainer
 .set
@@ -932,36 +932,32 @@
 ata(SWT.
-DEFAULT, SWT.DEFAULT
+FILL, SWT.CENTER
 , true, 
@@ -952,38 +952,32 @@
 NTER, true, true
-, 1, 1
 ));%0D%0A%09%09final Lab
@@ -977,141 +977,190 @@
 nal 
-Label name = new Label(composite, SWT.DEFAULT);%0D%0A%09%09name.setLayoutData(new GridData(SWT.DEFAULT, SWT.DEFAULT, true, true, 1, 1));%0D%0A%09%09n
+GridLayout layout = new GridLayout(2, false);%0D%0A%09%09layout.marginWidth = 30;%0D%0A%09%09container.setLayout(layout);%0D%0A%0D%0A%09%09final Label lbtFirstName = new Label(container, SWT.NONE);%0D%0A%09%09lbtFirstN
 ame.
@@ -1173,32 +1173,34 @@
 t(%22Name%22);%0D%0A
+%0D%0A
 %09%09final 
 Text textNam
@@ -1191,64 +1191,217 @@
 nal 
-Text textName = new Text(composite, SWT.DEFAULT
+GridData dataFirstName = new GridData();%0D%0A%09%09dataFirstName.grabExcessHorizontalSpace = true;%0D%0A%09%09dataFirstName.horizontalAlignment = GridData.FILL;%0D%0A%0D%0A%09%09txtFirstName = new Text(container, SWT.BORDER
 );%0D%0A%09%09t
-e
 x
+tFirs
 tNam
@@ -1420,66 +1420,25 @@
 ata(
-new GridData(SWT.DEFAULT, SWT.DEFAULT, true, true, 1, 1));
+dataFirstName);%0D%0A
 %0D%0A%09%09
@@ -1449,19 +1449,27 @@
 l Label 
-psw
+lbtLastName
  = new L
@@ -1479,194 +1479,266 @@
 l(co
-mposite, SWT.DEFAULT);%0D%0A%09%09psw.setLayoutData(new GridData(SWT.DEFAULT, SWT.DEFAULT, true, true, 1, 1));%0D%0A%09%09psw.setText(%22Passwort%22);%0D%0A%09%09final Text textPsw = new Text(composite, SWT.DEFAULT
+ntainer, SWT.NONE);%0D%0A%09%09lbtLastName.setText(%22Passwort%22);%0D%0A%0D%0A%09%09final GridData dataLastName = new GridData();%0D%0A%09%09dataLastName.grabExcessHorizontalSpace = true;%0D%0A%09%09dataLastName.horizontalAlignment = GridData.FILL;%0D%0A%09%09lastNameText = new Text(container, SWT.BORDER
  %7C S
@@ -1758,15 +1758,20 @@
 %0D%0A%09%09
-textPsw
+lastNameText
 .set
@@ -1785,85 +1785,20 @@
 ata(
-new GridData(SWT.DEFAULT, SWT.DEFAULT, true, true, 1, 1));%0D%0A%09%09composite.pack(
+dataLastName
 );%0D%0A
@@ -1810,17 +1810,12 @@
 urn 
-composite
+area
 ;%0D%0A%09

create login dialog