Class DialogBoxWithCloseButton
- java.lang.Object
-
- com.google.gwt.user.client.ui.UIObject
-
- com.google.gwt.user.client.ui.Widget
-
- com.google.gwt.user.client.ui.Panel
-
- com.google.gwt.user.client.ui.SimplePanel
-
- com.google.gwt.user.client.ui.PopupPanel
-
- com.google.gwt.user.client.ui.DecoratedPopupPanel
-
- com.google.gwt.user.client.ui.DialogBox
-
- uk.ac.rdg.resc.godiva.client.widgets.DialogBoxWithCloseButton
-
- 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>,EventListener
- Direct Known Subclasses:
StartEndTimePopup
public class DialogBoxWithCloseButton extends com.google.gwt.user.client.ui.DialogBoxExtended DialogBox widget with close button inside the pop-up header- Author:
- L.Pelov Slight modification to have a hardcoded close image. Original code from: http://code.google.com/p/wcinteractions/source/browse/trunk/MVP/ src/com/mvp/client/ui/widget/DialogBoxExt.java Modification to allow custom centring, Guy Griffiths
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceDialogBoxWithCloseButton.CentrePosIF-
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.AnimationType, com.google.gwt.user.client.ui.PopupPanel.PositionCallback
-
-
Constructor Summary
Constructors Constructor Description DialogBoxWithCloseButton(DialogBoxWithCloseButton.CentrePosIF localCentre)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcenter()This centres the dialog box, but uses aDialogBoxWithCloseButton.CentrePosIFto define the centre position (so that for example we can centre this box over a map, or other widget)protected booleanisHeaderCloseControlEvent(com.google.gwt.dom.client.NativeEvent event)Function checks if the browser event is was inside the caption regionprotected booleanisWidgetEvent(com.google.gwt.dom.client.NativeEvent event, com.google.gwt.user.client.ui.Widget w)Function checks if event was inside a given widgetvoidonBrowserEvent(com.google.gwt.user.client.Event event)Overrides the browser event from the DialogBoxvoidsetHTML(com.google.gwt.safehtml.shared.SafeHtml html)voidsetHTML(String html)-
Methods inherited from class com.google.gwt.user.client.ui.DialogBox
beginDragging, continueDragging, doAttachChildren, doDetachChildren, endDragging, getCaption, getHTML, getText, hide, onEnsureDebugId, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseUp, onPreviewNativeEvent, 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, getAnimationType, 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, setAnimationType, setAutoHideEnabled, setAutoHideOnHistoryEventsEnabled, setGlassEnabled, setGlassStyleName, setHeight, setModal, setPopupPosition, setPopupPositionAndShow, setPreviewingAllNativeEvents, setTitle, setVisible, setWidth, showRelativeTo
-
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, unsinkEvents
-
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
DialogBoxWithCloseButton
public DialogBoxWithCloseButton(DialogBoxWithCloseButton.CentrePosIF localCentre)
-
-
Method Detail
-
setHTML
public void setHTML(String html)
- Specified by:
setHTMLin interfacecom.google.gwt.user.client.ui.HasHTML- Overrides:
setHTMLin classcom.google.gwt.user.client.ui.DialogBox
-
setHTML
public void setHTML(com.google.gwt.safehtml.shared.SafeHtml html)
- Specified by:
setHTMLin interfacecom.google.gwt.safehtml.client.HasSafeHtml- Overrides:
setHTMLin classcom.google.gwt.user.client.ui.DialogBox
-
isHeaderCloseControlEvent
protected boolean isHeaderCloseControlEvent(com.google.gwt.dom.client.NativeEvent event)
Function checks if the browser event is was inside the caption region- Parameters:
event- browser event- Returns:
- true if event inside the caption panel (DialogBox header)
-
onBrowserEvent
public void onBrowserEvent(com.google.gwt.user.client.Event event)
Overrides the browser event from the DialogBox- Specified by:
onBrowserEventin interfacecom.google.gwt.user.client.EventListener- Overrides:
onBrowserEventin classcom.google.gwt.user.client.ui.DialogBox
-
isWidgetEvent
protected boolean isWidgetEvent(com.google.gwt.dom.client.NativeEvent event, com.google.gwt.user.client.ui.Widget w)Function checks if event was inside a given widget- Parameters:
event- - current eventw- - widget to prove if event was inside- Returns:
- - true if event inside the given widget
-
center
public void center()
This centres the dialog box, but uses aDialogBoxWithCloseButton.CentrePosIFto define the centre position (so that for example we can centre this box over a map, or other widget)- Overrides:
centerin classcom.google.gwt.user.client.ui.PopupPanel
-
-