/*
* Ext GWT - Ext for GWT
* Copyright(c) 2007-2009, Ext JS, LLC.
* licensing@extjs.com
*
* http://extjs.com/license
*/
package com.google.gwt.sample.hello.client;
import com.extjs.gxt.ui.client.event.Listener;
import com.extjs.gxt.ui.client.event.MessageBoxEvent;
import com.extjs.gxt.ui.client.widget.Info;
import com.extjs.gxt.ui.client.widget.MessageBox;
import com.extjs.gxt.ui.client.widget.button.Button;
import com.google.gwt.core.client.EntryPoint;
public class Hello implements EntryPoint {
public void onModuleLoad() {
final Listener l = new Listener() {
public void handleEvent(MessageBoxEvent ce) {
Button btn = ce.getButtonClicked();
Info.display("MessageBox", "The '{0}' button was pressed", btn.getText());
}
};
MessageBox box = new MessageBox();
box.setButtons(MessageBox.YESNOCANCEL);
box.setIcon(MessageBox.QUESTION);
box.setTitle("Save Changes?");
box.addCallback(l);
box.setMessage("You are closing a tab that has unsaved changes. Would you like to save your changes?");
box.show();
}
}
Ext-GWT.zip( 4,297 k)