package com.test.client;

import com.google.gwt.core.client.EntryPoint;
import com.smartgwt.client.types.Alignment;
import com.smartgwt.client.widgets.Label;
import com.smartgwt.client.widgets.Window;
import com.smartgwt.client.widgets.layout.VLayout;

public class Demo implements EntryPoint
{

  private static class DemoWindow extends Window
  {
    public DemoWindow()
    {
      setWidth(450);
      setHeight(200);
      setTitle("Demo Window with shadows");
      setShowShadow(true);
      setShowModalMask(true);
      setIsModal(true);

      centerInPage();

      final VLayout vLayout = new VLayout();
      vLayout.setID("vlayout" + getID());
      vLayout.setWidth100();
      vLayout.setHeight100();
      vLayout.setMargin(5);
      vLayout.setMembersMargin(10);
      vLayout.setDefaultLayoutAlign(Alignment.CENTER);

      final Label label = new Label("Demo window");
      label.setHeight(10);
      label.setWidth100();
      label.setAlign(Alignment.CENTER);

      vLayout.setMembers(label);

      addItem(vLayout);
    }
  }

  @Override
  public void onModuleLoad()
  {

    final DemoWindow testWindow = new DemoWindow();

    testWindow.draw();
  }
}
