/*******************************************************************************
* Copyright (c) 2014 MEDEVIT.
* 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:
* MEDEVIT <office@medevit.at> - initial API and implementation
******************************************************************************/
package at.medevit.ch.artikelstamm.elexis.common.ui;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
import at.medevit.ch.artikelstamm.IArtikelstammItem;
public class ArtikelstammDetailDialog extends Dialog {
private final IArtikelstammItem item;
/**
* Create the dialog.
* @param parentShell
* @param item
*/
public ArtikelstammDetailDialog(Shell parentShell, IArtikelstammItem item){
super(parentShell);
this.item = item;
}
/**
* Create contents of the dialog.
* @param parent
*/
@Override
protected Control createDialogArea(Composite parent){
Composite area = (Composite) super.createDialogArea(parent);
DetailDisplay detailDisplay = new DetailDisplay();
detailDisplay.createDisplay(area, null);
detailDisplay.display(item);
return area;
}
/**
* Create contents of the button bar.
* @param parent
*/
@Override
protected void createButtonsForButtonBar(Composite parent){
createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
}
}