/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package test.client;

import com.google.gwt.core.client.EntryPoint;
import com.smartgwt.client.util.SC;
import com.smartgwt.client.widgets.form.DynamicForm;
import com.smartgwt.client.widgets.form.fields.LinkItem;
import com.smartgwt.client.widgets.form.fields.StaticTextItem;
import com.smartgwt.client.widgets.layout.VLayout;

/**
 * Main entry point.
 *
 * @author mazzi
 */
public class MainEntryPoint implements EntryPoint {
    /** 
     * Creates a new instance of MainEntryPoint
     */
    public MainEntryPoint() {
    }

    /** 
     * The entry point method, called automatically by loading a module
     * that declares an implementing class as an entry-point
     */
    public void onModuleLoad() {
       VLayout layout = new VLayout();

	   DynamicForm form = new DynamicForm();
	   form.setNumCols(4);

	   LinkItem item1 = new LinkItem("profile");
	//   SC.logWarn("### item1 textboxstyle: " + item1.getTextBoxStyle());
	   item1.setShowTitle(false);
	   item1.setTextBoxStyle("link");
	   item1.setLinkTitle("My Profile");
	//   SC.logWarn("### post textboxstyle: " + item1.getTextBoxStyle());

	   LinkItem item2 = new LinkItem("settings");
	   item2.setShowTitle(false);
	   item2.setTextBoxStyle("link");
	   item2.setLinkTitle("Settings");

	   LinkItem help = new LinkItem("link");
	   help.setShowTitle(false);

	   help.setLinkTitle("veeeeeery loooooooonnnnnnnnnnnnnng link");

	   StaticTextItem text = new StaticTextItem("stext");
	   text.setShowTitle(false);
	   text.setWrap(false);
	   text.setTextBoxStyle("textItem");
	   text.setValue("static text");


	
	   form.setFields(item1, item2, help, text);

	   layout.addMember(form);
	   layout.draw();

    }
}
