Configure the MessageBox (Ext GWT) : Dialog « GWT « Java

Home
Java
1.2D Graphics GUI
2.3D
3.Advanced Graphics
4.Ant
5.Apache Common
6.Chart
7.Class
8.Collections Data Structure
9.Data Type
10.Database SQL JDBC
11.Design Pattern
12.Development Class
13.EJB3
14.Email
15.Event
16.File Input Output
17.Game
18.Generics
19.GWT
20.Hibernate
21.I18N
22.J2EE
23.J2ME
24.JavaFX
25.JDK 6
26.JDK 7
27.JNDI LDAP
28.JPA
29.JSP
30.JSTL
31.Language Basics
32.Network Protocol
33.PDF RTF
34.Reflection
35.Regular Expressions
36.Scripting
37.Security
38.Servlets
39.Spring
40.Swing Components
41.Swing JFC
42.SWT JFace Eclipse
43.Threads
44.Tiny Application
45.Velocity
46.Web Services SOA
47.XML
Java » GWT » Dialog 




Configure the MessageBox (Ext GWT)
Configure the MessageBox (Ext GWT)
 
/*
 * 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<MessageBoxEvent> l = new Listener<MessageBoxEvent>() {
      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)
Related examples in the same category
1.Create Custom Dialog
2.Add label to a window (Smart GWT)Add label to a window (Smart GWT)
3.Add Footer to a window (Smart GWT)Add Footer to a window (Smart GWT)
4.Adding controls to window header (Smart GWT)Adding controls to window header (Smart GWT)
5.Minimizing a window (Smart GWT)Minimizing a window (Smart GWT)
6.Modal window with controls (Smart GWT)Modal window with controls (Smart GWT)
7.Mormal window vs auto-resizing window (Smart GWT)Mormal window vs auto-resizing window (Smart GWT)
8.Draggable window (Smart GWT)Draggable window (Smart GWT)
9.Put complex control onto a dialog (Smart GWT)Put complex control onto a dialog (Smart GWT)
10.Confirmation dialog (Smart GWT)Confirmation dialog (Smart GWT)
11.Expandable dialog with expandable panel (Smart GWT)Expandable dialog with expandable panel (Smart GWT)
12.A custom form control implemented as a picker (Smart GWT)A custom form control implemented as a picker (Smart GWT)
13.Adding accordion panel to a window (Ext GWT)Adding accordion panel to a window (Ext GWT)
14.Alert MessageBox (Ext GWT)Alert MessageBox (Ext GWT)
15.Confirmation MessageBox (Ext GWT)Confirmation MessageBox (Ext GWT)
16.Prompt MessageBox (Ext GWT)Prompt MessageBox (Ext GWT)
17.Adding callback listener to MessageBox (Ext GWT)Adding callback listener to MessageBox (Ext GWT)
18.Multi-line prompt MessageBox (Ext GWT)Multi-line prompt MessageBox (Ext GWT)
19.Progress Bar dialog box (Ext GWT)Progress Bar dialog box (Ext GWT)
20.Timer based dialog box (Ext GWT)Timer based dialog box (Ext GWT)
21.Put TabPanel to Window to create a dialog (Ext GWT)Put TabPanel to Window to create a dialog (Ext GWT)
22.Simple dialog with text area and two buttons (Ext GWT)Simple dialog with text area and two buttons (Ext GWT)
23.Dialog with layout (Ext GWT)Dialog with layout (Ext GWT)
24.Create a popup window with Window class (Ext GWT)Create a popup window with Window class (Ext GWT)
25.Login dialog (Ext GWT)Login dialog (Ext GWT)
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.