package com.ssdi.test.client;

import java.util.LinkedHashMap;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;
import com.smartgwt.client.widgets.form.DynamicForm;
import com.smartgwt.client.widgets.form.fields.SelectItem;
import com.smartgwt.client.widgets.layout.VLayout;

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

	public void onModuleLoad() {
		LinkedHashMap<String, String> map1 = new LinkedHashMap<String, String>();
		map1.put("1", "a");
		map1.put("2", "bbbbc");
		map1.put("3", "cc");
		map1.put("4", "こんにちはすべて、この文字列は、試験サンプルアプリケーションのためのも");
		
		LinkedHashMap<String, String> map2 = new LinkedHashMap<String, String>();
		map2.put("1", "a");
		map2.put("2", "こんにちはすべて、この文字列は、試験サンプルアプリケーションのためのものですサンプルアプリケーション");
        map2.put("3", "cc");
		map2.put("4", "dd");

		SelectItem cmbTest1 = new SelectItem("test1", "Select 1");
		SelectItem cmbTest2 = new SelectItem("test2", "Select 2");
		SelectItem cmbTest3 = new SelectItem("test3", "Select 3");
		SelectItem cmbTest4 = new SelectItem("test4", "Select 4");

		cmbTest1.setValueMap(map1);
		cmbTest1.setCellHeight(100);
	    cmbTest2.setValueMap(map2);
		cmbTest3.setValueMap(map1);
		cmbTest4.setValueMap(map2);

		
		cmbTest1.setWrapTitle(false);
		cmbTest2.setWrapTitle(false);
		cmbTest3.setWrapTitle(false);
		cmbTest4.setWrapTitle(false);

		DynamicForm form = new DynamicForm();
		form.setItems(cmbTest1, cmbTest2, cmbTest3, cmbTest4);
		form.setWidth100();

		VLayout rootWrapper = new VLayout();
		rootWrapper.setWidth100();
		rootWrapper.setHeight100();
		rootWrapper.setShowEdges(true);
		rootWrapper.addMember(form);
		rootWrapper.draw();


	}

}
