package de.ugoe.cs.swe.memos.gui.dialogs;

import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.TitleAreaDialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.*;

public class AboutDialog extends TitleAreaDialog {

	public AboutDialog(Shell parentShell) {
		super(parentShell);
	}

	protected Control createContents(Composite parent) {
		Control contents = super.createContents(parent);

		setTitle("About");
		setMessage("Scientific Notes Manager");
		getButton(IDialogConstants.CANCEL_ID).dispose();
		return contents;
	}
	

	protected Control createDialogArea(Composite parent) {
		Composite comp = (Composite) super.createDialogArea(parent);

		Label aboutLabel = new Label(comp, SWT.CENTER);
		aboutLabel.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_CENTER | GridData.HORIZONTAL_ALIGN_CENTER));
		aboutLabel.setText("\n\nVersion: Release 2\n\n(c): Xtreme Programming Team 2 2009 \n  Georg August Universität Göttingen");

		return comp;
	}
}
