package com.smartgwt.sample.client;

import java.util.Date;

import com.google.gwt.core.client.EntryPoint;
import com.smartgwt.client.types.TimeUnit;
import com.smartgwt.client.widgets.IButton;
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.form.DynamicForm;
import com.smartgwt.client.widgets.grid.ListGrid;
import com.smartgwt.client.widgets.layout.VLayout;
import com.smartgwt.client.widgets.viewer.DetailViewer;

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

    /**
     * This is the entry point method.
     */
    public void onModuleLoad() {
    		Lane lane = new Lane("charlesMadigen", "Charles Madigen");
    		lane.setHeight(400);
    	 Lane[] developers = new Lane[]{  
    			 lane
    	        };  
    	  
    	        Timeline calendar = new Timeline();  
    	        calendar.setHeight(451);  
    	        calendar.setFirstDayOfWeek(1);
    	        calendar.setStartDate(new Date(112, 5, 2));  
    	        calendar.setEndDate(new Date(112, 5, 22));  
    	        calendar.setData(TimelineData.getRecords());  
    	        calendar.setLanes(developers);  
    	        calendar.setCanResizeTimelineEvents(false);  
    	        calendar.setCanEditLane(false);  
    	        calendar.setShowEventDescriptions(false); 
    	        calendar.setCanDragEvents(false);
    	        calendar.setCanEditEvents(false);
    	        calendar.setDefaultTimelineColumnSpan(56);	
    	        calendar.setEventOverlap(false);
    	        calendar.setEventOverlapIdenticalStartTimes(false);
    	  
    	        HeaderLevel[] headerLevels = new HeaderLevel[]{  
    	            new HeaderLevel(TimeUnit.WEEK),   
    	            new HeaderLevel(TimeUnit.DAY)  
    	        };  
    	        calendar.setHeaderLevels(headerLevels);  
    	    	calendar.draw();
    }
}