package com.smartgwt.sample.client;

import com.google.gwt.core.client.EntryPoint;
import com.smartgwt.client.core.KeyIdentifier;
import com.smartgwt.client.util.BooleanCallback;
import com.smartgwt.client.util.KeyCallback;
import com.smartgwt.client.util.Page;
import com.smartgwt.client.util.SC;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class TestSmartGwt implements EntryPoint {
	private LoginPage loginPage;

    /**
     * This is the entry point method.
     */
    public void onModuleLoad() {

        
		KeyIdentifier debugKey = new KeyIdentifier();
		debugKey.setCtrlKey(true);
		debugKey.setKeyName("D");

		Page.registerKey(debugKey, new KeyCallback() {
			public void execute(String keyName) {
				SC.showConsole();
			}
		});

		loginPage = new LoginPage(new BooleanCallback() {

			@Override
			public void execute(Boolean pswIsCurrent) {
				SC.say("Successful login");
			}
		});

			loginPage.show();
  
    }

}
