]> source.dussan.org Git - vaadin-framework.git/commitdiff
Window size + some comments
authorMarc Englund <marc.englund@itmill.com>
Wed, 7 Nov 2007 09:59:10 +0000 (09:59 +0000)
committerMarc Englund <marc.englund@itmill.com>
Wed, 7 Nov 2007 09:59:10 +0000 (09:59 +0000)
svn changeset:2727/svn branch:trunk

src/com/itmill/toolkit/demo/NotificationDemo.java

index 00cfd182dc4bee99f8a881fdd5de93f007e3da17..6e7015f8505cedda0071a76d5db038b48a7d7b3d 100644 (file)
@@ -36,11 +36,15 @@ public class NotificationDemo extends com.itmill.toolkit.Application {
                Window main = new Window("Notification demo");
                setMainWindow(main);
 
+               /*
+                * Create a 'inline' window within the main window, and set its size.
+                */
                Window conf = new Window("Show Notification");
-               conf.setWidth(450);
-               conf.setHeight(340);
+               conf.setWidth(460);
+               conf.setHeight(360);
                main.addWindow(conf);
 
+               // Dropdown select for notification type.
                type = new NativeSelect("Notification type");
                type.addContainerProperty("caption", String.class, null);
                type.setNullSelectionAllowed(false);
@@ -59,23 +63,23 @@ public class NotificationDemo extends com.itmill.toolkit.Application {
                type.setValue(new Integer(Window.Notification.TYPE_HUMANIZED_MESSAGE));
                conf.addComponent(type);
 
+               // Notification caption
                caption = new TextField("Caption");
-               caption.setValue("Saved!");
+               caption.setValue("Brown Fox!");
                caption.setColumns(20);
                conf.addComponent(caption);
-
+               // Notification message
                message = new RichTextArea();
                message.setCaption("Message");
-               message.setValue("Your stuff has been saved in <b>MyDocuments</b>.");
+               message.setValue("A quick one jumped over the lazy dog.");
                conf.addComponent(message);
-
+               // Button to show the notification
                Button b = new Button("Show notification", new ClickListener() {
                        public void buttonClick(ClickEvent event) {
                                getMainWindow().showNotification((String) caption.getValue(),
                                                (String) message.getValue(),
                                                ((Integer) type.getValue()).intValue());
                        }
-
                });
                conf.addComponent(b);
        }