package de.smartgwttest.client;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import com.google.gwt.core.client.EntryPoint;
import com.smartgwt.client.data.DataSource;
import com.smartgwt.client.data.Record;
import com.smartgwt.client.data.fields.DataSourceIntegerField;
import com.smartgwt.client.data.fields.DataSourceTextField;
import com.smartgwt.client.types.Alignment;
import com.smartgwt.client.types.Overflow;
import com.smartgwt.client.types.TimeUnit;
import com.smartgwt.client.types.VisibilityMode;
import com.smartgwt.client.widgets.Button;
import com.smartgwt.client.widgets.IButton;
import com.smartgwt.client.widgets.Img;
import com.smartgwt.client.widgets.calendar.HeaderLevel;
import com.smartgwt.client.widgets.calendar.Lane;
import com.smartgwt.client.widgets.calendar.Timeline;
import com.smartgwt.client.widgets.events.ClickEvent;
import com.smartgwt.client.widgets.events.ClickHandler;
import com.smartgwt.client.widgets.form.DynamicForm;
import com.smartgwt.client.widgets.form.ValuesManager;
import com.smartgwt.client.widgets.form.fields.TextItem;
import com.smartgwt.client.widgets.form.fields.events.BlurEvent;
import com.smartgwt.client.widgets.form.fields.events.BlurHandler;
import com.smartgwt.client.widgets.grid.ListGrid;
import com.smartgwt.client.widgets.grid.ListGridField;
import com.smartgwt.client.widgets.grid.ListGridRecord;
import com.smartgwt.client.widgets.grid.SortNormalizer;
import com.smartgwt.client.widgets.grid.events.RecordClickEvent;
import com.smartgwt.client.widgets.grid.events.RecordClickHandler;
import com.smartgwt.client.widgets.layout.HLayout;
import com.smartgwt.client.widgets.layout.SectionStack;
import com.smartgwt.client.widgets.layout.SectionStackSection;
import com.smartgwt.client.widgets.layout.VLayout;
import com.smartgwt.client.widgets.tab.Tab;
import com.smartgwt.client.widgets.tab.TabSet;
import com.smartgwt.client.widgets.toolbar.ToolStrip;
import com.smartgwt.client.widgets.toolbar.ToolStripButton;
import com.smartgwt.client.widgets.tree.TreeGrid;

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

	int count = 1;


	/**
	 * This is the entry point method.
	 */
	public void onModuleLoad() {

		Lane[] developers = new Lane[] {
				new Lane("charlesMadigen", "Charles Madigen"),
				new Lane("tamaraKane", "Tamara Kane"),
				new Lane("darcyFeeney", "Darcy Feeney"),
				new Lane("kaiKong", "Kai Kong"),
				new Lane("shelleyFewel", "Shelley Fewel"),
				new Lane("garretMonroe", "Garret Monroe") };
		

		Timeline calendar = new Timeline();
		calendar.setWidth100();
		calendar.setHeight100();
		
		Date startDate = new Date();
		startDate.setHours(0);
		startDate.setMinutes(0);
		startDate.setSeconds(0);
		calendar.setStartDate(startDate);
		Date endDate = new Date();
		endDate.setHours(23);
		endDate.setMinutes(59);
		endDate.setSeconds(59);
		calendar.setEndDate(endDate);
		calendar.setChosenDate(startDate);
		
		calendar.setLanes(developers);
		calendar.setCanResizeTimelineEvents(true);
		calendar.setCanEditLane(true);
		calendar.setShowEventDescriptions(false);
		calendar.setEventSnapGap(15);

        HeaderLevel[] headerLevels = new HeaderLevel[] { new HeaderLevel(TimeUnit.DAY), new HeaderLevel(TimeUnit.HOUR) };
		calendar.setHeaderLevels(headerLevels);
		
		
		calendar.draw();
	}
}
