package com.firebet.sandbox.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.GWT.UncaughtExceptionHandler;
import com.smartgwt.client.data.Criteria;
import com.smartgwt.client.util.SC;
import com.smartgwt.client.widgets.layout.VLayout;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class Sandbox implements EntryPoint {	

	/**
	 * This is the entry point method.
	 */
	public void onModuleLoad() {
		
		GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
			
			@Override
			public void onUncaughtException(Throwable e) {
				SC.warn(e.getMessage());
			}
		});
		SC.showConsole();

		final VLayout layout = new VLayout();
		layout.setHeight100();
		layout.setWidth100();
		layout.setBackgroundColor("#22AAFF");
		layout.draw();
		
		final FieldTestListGrid grid = new FieldTestListGrid();
		grid.setAutoFetchData(false);
		grid.fetchData(new Criteria());
		grid.setWidth(100);
		grid.setHeight(100);
		layout.addMember(grid);
	}
}
