org.cobogw.gwt.user.client.ui
Class DeferredPopupCommand

java.lang.Object
  extended by org.cobogw.gwt.user.client.ui.DeferredPopupCommand

public class DeferredPopupCommand
extends java.lang.Object

This class is an extended version of the DeferredCommand class. This class will show a PopupPanel for the duration of the Command.execute() method. This will make it possible to provide easy user interactive feedback. For example showing a popup displaying the text 'Loading...'.

The class contains 2 addCommand methods. One that accepts a String and creates a PopupPanel with this String. The second accepts a PopupPanel and can be used to create a custom popup.

When using addCommand(Command, PopupPanel) make sure the popup is created with autohide set to false (This is default , but can be set). Otherwise the popup will disappear when the user clicks outside the popup.

CSS Style Rules

The following CSS example will show a small dark red PopupPanel in the upper right corner with white text:

 .cbg-DeferredPopupCommand {
   background-color : #DF4545;
   color            : white;
   padding          : 2px;
   margin-top       : 2px;
   right            : 0;
   top              : 0;
 }
 


Constructor Summary
DeferredPopupCommand()
           
DeferredPopupCommand(boolean modal)
           
DeferredPopupCommand(com.google.gwt.user.client.ui.PopupPanel popup)
           
 
Method Summary
static void addCommand(com.google.gwt.user.client.Command cmd, com.google.gwt.user.client.ui.PopupPanel popup)
          Enqueues a Command to be fired after all current events have been handled and displays the PopupPanel during the time the command is executed.
 void addCommand(com.google.gwt.user.client.Command cmd, java.lang.String text)
          Enqueues a Command to be fired after all current events have been handled and displays an optional modal PopupPanel during the time the command is executed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeferredPopupCommand

public DeferredPopupCommand()

DeferredPopupCommand

public DeferredPopupCommand(boolean modal)
Parameters:
modal - true if keyboard or mouse events that do not target the PopupPanel or its children should be ignored

DeferredPopupCommand

public DeferredPopupCommand(com.google.gwt.user.client.ui.PopupPanel popup)
Method Detail

addCommand

public void addCommand(com.google.gwt.user.client.Command cmd,
                       java.lang.String text)
Enqueues a Command to be fired after all current events have been handled and displays an optional modal PopupPanel during the time the command is executed.

Parameters:
cmd - the command to be fired
text - String to be displayed on the PopupPanel for the duration of the Command.execute() method

addCommand

public static void addCommand(com.google.gwt.user.client.Command cmd,
                              com.google.gwt.user.client.ui.PopupPanel popup)
Enqueues a Command to be fired after all current events have been handled and displays the PopupPanel during the time the command is executed.

Parameters:
cmd - the command to be fired
popup - PopupPanel to be displayed for the duration of the Command.execute() method


Copyright © 2007-2009 Hilbrand Bouwkamp. All Rights Reserved.