package es.dalocar.facturamas.swt.components;

import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.layout.GridData;

public class SaveCancelComposite extends Composite {
	private Button btnGuardar;
	private Button btnCancelar;

	
	/**
	 * Create the composite.
	 * @param parent
	 * @param style
	 */
	public SaveCancelComposite(Composite parent, int style) {
		super(parent, style);
		setLayout(new GridLayout(2, true));
		
		btnGuardar = new Button(this, SWT.NONE);
		btnGuardar.setEnabled(false);
		GridData gridData = new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1);
		gridData.widthHint = 120;
		gridData.heightHint = 47;
		btnGuardar.setLayoutData(gridData);
		btnGuardar.setText("Guardar");
		
		btnCancelar = new Button(this, SWT.NONE);
		GridData gridData_1 = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
		gridData_1.heightHint = 46;
		gridData_1.widthHint = 120;
		btnCancelar.setLayoutData(gridData_1);
		btnCancelar.setText("Cancelar");

	}

	protected void checkSubclass() {
		// Disable the check that prevents subclassing of SWT components
	}

	public Button getBtnGuardar() {
		return btnGuardar;
	}
	public Button getBtnCancelar() {
		return btnCancelar;
	}
}
