package com.client;

import java.util.LinkedHashMap;

import com.google.gwt.core.client.EntryPoint;
import com.smartgwt.client.types.MultipleAppearance;
import com.smartgwt.client.widgets.form.DynamicForm;
import com.smartgwt.client.widgets.form.fields.SelectItem;
/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class CheckBox implements EntryPoint {
	int browserWidth=0;
	int browserHeight=0;
	int x = 0;
	int y = 0;
	
	public void onModuleLoad() {
			  
	        DynamicForm selectComboForm = new DynamicForm();  
	        selectComboForm.setWidth(450);  
	  
	  
	        final SelectItem selectItemMultiplePickList = new SelectItem();  
	        selectItemMultiplePickList.setTitle("Select Multiple (PickList)");  
	        selectItemMultiplePickList.setMultiple(true);  
	        selectItemMultiplePickList.setMultipleAppearance(MultipleAppearance.PICKLIST);  
	        
	        
	        int[] dateValues = null;
	        LinkedHashMap<Integer, Integer> map=new LinkedHashMap<Integer, Integer>();

			dateValues = new int[31];
			for (int i = 0; i < 31; i++) {
				
				map.put(i + 1, i + 1);
			}
			
	        selectItemMultiplePickList.setValueMap(map);  
	        selectItemMultiplePickList.setDefaultValue(dateValues[0]);
	        selectItemMultiplePickList.setOptionDataSource(null);
	        
	        selectComboForm.setItems(selectItemMultiplePickList);  
	  
	        selectComboForm.draw();  
	}
}
