org.xwiki.gwt.user.client.ui
Class CompositeDialogBox

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.Composite
              extended by org.xwiki.gwt.user.client.ui.CompositeDialogBox
All Implemented Interfaces:
com.google.gwt.event.logical.shared.CloseHandler<com.google.gwt.user.client.ui.PopupPanel>, com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.logical.shared.HasCloseHandlers<CompositeDialogBox>, com.google.gwt.event.shared.EventHandler, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasVisibility, com.google.gwt.user.client.ui.IsRenderable, com.google.gwt.user.client.ui.IsWidget
Direct Known Subclasses:
ComplexDialogBox

public class CompositeDialogBox
extends com.google.gwt.user.client.ui.Composite
implements com.google.gwt.event.logical.shared.HasCloseHandlers<CompositeDialogBox>, com.google.gwt.event.logical.shared.CloseHandler<com.google.gwt.user.client.ui.PopupPanel>

The base class for any custom dialog box. It prevents unwanted modifications of the content from outside. It wraps DialogBox object that you can customize and which is not accessible outside.

Version:
$Id: 98f140029a78efc19131a1182233e1a606d5f820 $

Nested Class Summary
 
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
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.ui.UIObject
DEBUG_ID_PREFIX
 
Constructor Summary
CompositeDialogBox(boolean autoHide, boolean modal)
          Creates a new composite dialog box.
 
Method Summary
 com.google.gwt.event.shared.HandlerRegistration addCloseHandler(com.google.gwt.event.logical.shared.CloseHandler<CompositeDialogBox> handler)
           
 void center()
          Centers this dialog on the screen.
protected  DialogBox getDialog()
          Protected access to the underlying dialog box.
 void hide()
          Hides this dialog box.
protected  void initWidget(com.google.gwt.user.client.ui.Widget widget)
           
 boolean isShowing()
           
 void onClose(com.google.gwt.event.logical.shared.CloseEvent<com.google.gwt.user.client.ui.PopupPanel> event)
           
 
Methods inherited from class com.google.gwt.user.client.ui.Composite
claimElement, getWidget, initializeClaimedElement, isAttached, onAttach, onBrowserEvent, onDetach, render, render, resolvePotentialElement, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, 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

CompositeDialogBox

public CompositeDialogBox(boolean autoHide,
                          boolean modal)
Creates a new composite dialog box.

Parameters:
autoHide - Whether or not the dialog should auto hide when the user clicks outside of it.
modal - Specifies if the dialog box can loose focus.
Method Detail

initWidget

protected void initWidget(com.google.gwt.user.client.ui.Widget widget)
Overrides:
initWidget in class com.google.gwt.user.client.ui.Composite

getDialog

protected DialogBox getDialog()
Protected access to the underlying dialog box.

Returns:
the wrapped dialog box.

center

public void center()
Centers this dialog on the screen.

See Also:
PopupPanel.center()

hide

public void hide()
Hides this dialog box.

See Also:
PopupPanel.hide()

addCloseHandler

public com.google.gwt.event.shared.HandlerRegistration addCloseHandler(com.google.gwt.event.logical.shared.CloseHandler<CompositeDialogBox> handler)
Specified by:
addCloseHandler in interface com.google.gwt.event.logical.shared.HasCloseHandlers<CompositeDialogBox>

onClose

public void onClose(com.google.gwt.event.logical.shared.CloseEvent<com.google.gwt.user.client.ui.PopupPanel> event)
Specified by:
onClose in interface com.google.gwt.event.logical.shared.CloseHandler<com.google.gwt.user.client.ui.PopupPanel>

isShowing

public boolean isShowing()
Returns:
true if this dialog is currently shown, false otherwise
See Also:
PopupPanel.isShowing()


Copyright © 2004–2015 XWiki. All rights reserved.