org.overlord.sramp.ui.client.widgets.dialogs
Class GrowlDialog

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Panel
              extended by com.google.gwt.user.client.ui.SimplePanel
                  extended by com.google.gwt.user.client.ui.PopupPanel
                      extended by com.google.gwt.user.client.ui.DecoratedPopupPanel
                          extended by com.google.gwt.user.client.ui.DialogBox
                              extended by org.overlord.sramp.ui.client.widgets.dialogs.GrowlDialog
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.logical.shared.HasCloseHandlers<com.google.gwt.user.client.ui.PopupPanel>, com.google.gwt.event.shared.HasHandlers, com.google.gwt.safehtml.client.HasSafeHtml, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.EventPreview, com.google.gwt.user.client.ui.AcceptsOneWidget, com.google.gwt.user.client.ui.HasAnimation, com.google.gwt.user.client.ui.HasHTML, com.google.gwt.user.client.ui.HasOneWidget, com.google.gwt.user.client.ui.HasText, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.HasWidgets, com.google.gwt.user.client.ui.HasWidgets.ForIsWidget, com.google.gwt.user.client.ui.IsWidget, com.google.gwt.user.client.ui.MouseListener, com.google.gwt.user.client.ui.SourcesPopupEvents, Iterable<com.google.gwt.user.client.ui.Widget>

public class GrowlDialog
extends com.google.gwt.user.client.ui.DialogBox

Dialog implementation used for async notifications (growls).

Author:
eric.wittmann@redhat.com

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.DialogBox
com.google.gwt.user.client.ui.DialogBox.Caption, com.google.gwt.user.client.ui.DialogBox.CaptionImpl
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.PopupPanel
com.google.gwt.user.client.ui.PopupPanel.PositionCallback
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
 
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets
com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
GrowlDialog(String title, String message, GrowlType type)
          Constructor.
 
Method Summary
 void addCloseHandler(com.google.gwt.event.dom.client.ClickHandler closeHandler)
          Adds a handler that will get called back when the user clicks the close button.
 GrowlType getGrowlType()
           
protected  void onMouseIn()
          Called when the mouse enters the dialog.
protected  void onMouseOut()
          Called when the mouse leaves the dialog.
protected  void onPreviewNativeEvent(com.google.gwt.user.client.Event.NativePreviewEvent event)
           
 void setGrowlType(GrowlType growlType)
           
 void setMessage(String message, GrowlType type)
          Sets the dialog's message.
 void setMessage(com.google.gwt.user.client.ui.Widget message, GrowlType type)
          Sets the dialog's message (directly as a Widget).
 void setTitle(String title)
           
 
Methods inherited from class com.google.gwt.user.client.ui.DialogBox
beginDragging, continueDragging, doAttachChildren, doDetachChildren, endDragging, getCaption, getHTML, getText, hide, onBrowserEvent, onEnsureDebugId, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseUp, setHTML, setHTML, setText, show
 
Methods inherited from class com.google.gwt.user.client.ui.DecoratedPopupPanel
clear, getCellElement, getWidget, iterator, remove, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.PopupPanel
addAutoHidePartner, addCloseHandler, addPopupListener, center, getContainerElement, getGlassElement, getGlassStyleName, getOffsetHeight, getOffsetWidth, getPopupLeft, getPopupTop, getStyleElement, getTitle, hide, isAnimationEnabled, isAutoHideEnabled, isAutoHideOnHistoryEventsEnabled, isGlassEnabled, isModal, isPreviewingAllNativeEvents, isShowing, isVisible, onEventPreview, onKeyDownPreview, onKeyPressPreview, onKeyUpPreview, onUnload, removeAutoHidePartner, removePopupListener, setAnimationEnabled, setAutoHideEnabled, setAutoHideOnHistoryEventsEnabled, setGlassEnabled, setGlassStyleName, setHeight, setModal, setPopupPosition, setPopupPositionAndShow, setPreviewingAllNativeEvents, setVisible, setWidth, showRelativeTo
 
Methods inherited from class com.google.gwt.user.client.ui.SimplePanel
add, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, adopt, adopt, disown, orphan, remove
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onDetach, onLoad, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, sinkBitlessEvent, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.google.gwt.event.shared.HasHandlers
fireEvent
 

Constructor Detail

GrowlDialog

public GrowlDialog(String title,
                   String message,
                   GrowlType type)
Constructor.

Parameters:
title -
message -
type -
Method Detail

setTitle

public void setTitle(String title)
Overrides:
setTitle in class com.google.gwt.user.client.ui.PopupPanel
See Also:
PopupPanel.setTitle(java.lang.String)

setMessage

public void setMessage(String message,
                       GrowlType type)
Sets the dialog's message.

Parameters:
message -
type -

setMessage

public void setMessage(com.google.gwt.user.client.ui.Widget message,
                       GrowlType type)
Sets the dialog's message (directly as a Widget). This variant allows clients to set rich HTML as the growl content, complete with behavior (event handlers).

Parameters:
message -

addCloseHandler

public void addCloseHandler(com.google.gwt.event.dom.client.ClickHandler closeHandler)
Adds a handler that will get called back when the user clicks the close button.

Parameters:
closeHandler -

onPreviewNativeEvent

protected void onPreviewNativeEvent(com.google.gwt.user.client.Event.NativePreviewEvent event)
Overrides:
onPreviewNativeEvent in class com.google.gwt.user.client.ui.DialogBox
See Also:
DialogBox.onPreviewNativeEvent(com.google.gwt.user.client.Event.NativePreviewEvent)

onMouseIn

protected void onMouseIn()
Called when the mouse enters the dialog.


onMouseOut

protected void onMouseOut()
Called when the mouse leaves the dialog.


getGrowlType

public GrowlType getGrowlType()
Returns:
the growlType

setGrowlType

public void setGrowlType(GrowlType growlType)
Parameters:
growlType - the growlType to set


Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.