package TestApp01_call;

import javax.swing.JOptionPane;

import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;

import com.global.api.entities.exceptions.ApiException;

import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.VerifyEvent;
import org.eclipse.swt.events.VerifyListener;
import TestApp01_call.reqMsg;

public class popUp05 extends Shell {
	private Boolean buttonpress = false;
	protected static Shell shell = null;
	protected static Composite composite;
	private static popUp05 popUp = null;

	public Boolean getbuttonpress() {
		return buttonpress;
	}

	private static synchronized popUp05 getInstance() {
		try {
			if (popUp == null)
				popUp = (popUp05) Class.forName("popUp05").newInstance();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return popUp;
	}

	/**
	 * Launch the application.
	 * 
	 * @param args
	 */
	public static void main(String args[]) {
		try {
			Display display = Display.getDefault();
			shell = new popUp05(display);
			composite = new Composite(shell, SWT.NONE);
			shell.open();
			shell.setVisible(true);
			shell.layout();
			while (!shell.isDisposed()) {
				if (!display.readAndDispatch()) {
					display.sleep();
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	/**
	 * Create the shell.
	 * 
	 * @param display
	 */
	public popUp05(Display display) {
		super(display, SWT.DIALOG_TRIM);
//		createContents(null);
	}

	/**
	 * Create contents of the shell.
	 */
	protected void createContents() {
		setText("  ");
		setSize(322, 139);
		


		Label lblTableNumber = new Label(this, SWT.NONE);
		lblTableNumber.setAlignment(SWT.CENTER);
		lblTableNumber.setBounds(75, 25, 165, 20);
		lblTableNumber.setText("Transaction In Progress....");

		Button btnCancel = new Button(this, SWT.NONE);
		btnCancel.addSelectionListener(new SelectionAdapter() {
			@Override
			public void widgetSelected(SelectionEvent e) {
					buttonpress = true;
					close();
//				}
			}
		});
		btnCancel.setBounds(121, 68, 74, 30);
		btnCancel.setText("Cancel");
	}

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