Dose GWT support non-modal dialog? Or any widget that can float over
existing client area?
Thanks in advance
Regards,
Prakash
http://code.google.com/webtoolkit/documentation/com.google.gwt.user.client.ui.DialogBox.html
For an example, go to the e-mail demo and click "about"
-- Pack
-- Pack
here is a fragmet of code of onEventPreview from PopupDialog if you
interessed whats going on there, and a bit lazy to look inside it:
/**
* Called when a browser event occurs and this event preview is on
top of the
* preview stack.
*
* @param event the browser event
* @return <code>false</code> to cancel the event
* @see DOM#addEventPreview(EventPreview)
*/
public boolean onEventPreview(Event event) {
int type = DOM.eventGetType(event);
switch (type) {
.
.
.
case Event.ONMOUSEDOWN:
case Event.ONMOUSEUP:
case Event.ONMOUSEMOVE:
case Event.ONCLICK:
case Event.ONDBLCLICK: {
// Don't eat events if event capture is enabled, as this can
interfere
// with dialog dragging, for example.
if (DOM.getCaptureElement() == null) {
// Disallow mouse events outside of the popup.
Element target = DOM.eventGetTarget(event);
if (!DOM.isOrHasChild(getElement(), target)) {
// If it's a click event, and auto-hide is enabled: hide
the popup
// and _don't_ eat the event.
if (autoHide && (type == Event.ONCLICK)) {
hide(true);
return true;
}
return false;
}
}
.
.
.
Thanks