Removing jgw contamination from the bobv r1096 patch. git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@1098 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/src/com/google/gwt/user/client/ui/PopupPanel.java b/user/src/com/google/gwt/user/client/ui/PopupPanel.java index 39054f6..277d31b 100644 --- a/user/src/com/google/gwt/user/client/ui/PopupPanel.java +++ b/user/src/com/google/gwt/user/client/ui/PopupPanel.java
@@ -26,11 +26,7 @@ /** * A panel that can "pop up" over other widgets. It overlays the browser's * client area (and any previously-created popups). - * <p/> - * The width and height of the PopupPanel cannot be explicitly set; they are - * determined by the PopupPanel's widget. Calls to {@link #setWidth(String)} and - * {@link #setHeight(String)} will call these methods on the PopupPanel's - * widget. + * * <p> * <img class='gallery' src='PopupPanel.png'/> * </p> @@ -54,6 +50,7 @@ */ public PopupPanel() { super(impl.createElement()); + DOM.setStyleAttribute(getElement(), "position", "absolute"); } /** @@ -125,10 +122,6 @@ return DOM.getElementPropertyInt(getElement(), "offsetTop"); } - public String getStyleName() { - return DOM.getElementProperty(getContainerElement(), "className"); - } - /** * Hides the popup. This has no effect if it is not currently visible. */ @@ -198,7 +191,7 @@ } } - return !modal || eventTargetsPopup; + return !modal || (modal && eventTargetsPopup); } /** @@ -241,7 +234,10 @@ } public boolean remove(Widget w) { - return super.remove(w); + if (!super.remove(w)) { + return false; + } + return true; } public void removePopupListener(PopupListener listener) { @@ -251,19 +247,6 @@ } /** - * Calls {@link Widget#setHeight(String)} on this panel's widget. If this panel - * does not have a widget, then this call does nothing. - * - * @param height the new height of this panel's widget, in CSS units (e.g. "10px", "1em") - */ - public void setHeight(String height) { - Widget childWidget = getWidget(); - if (childWidget != null) { - childWidget.setHeight(height); - } - } - - /** * Sets the popup's position relative to the browser's client area. The * popup's position may be set before calling {@link #show()}. * @@ -310,19 +293,6 @@ } /** - * Calls {@link Widget#setWidth(String)} on this panel's widget. If this panel - * does not have a widget, then this call does nothing. - * - * @param width the new width of this panel's widget, in CSS units (e.g. "10px", "1em") - */ - public void setWidth(String width) { - Widget childWidget = getWidget(); - if (childWidget != null) { - childWidget.setWidth(width); - } - } - - /** * Shows the popup. It must have a child widget before this method is called. */ public void show() { @@ -333,14 +303,9 @@ DOM.addEventPreview(this); RootPanel.get().add(this); - DOM.setStyleAttribute(getElement(), "position", "absolute"); impl.onShow(getElement()); } - protected Element getContainerElement() { - return impl.getContainerElement(getElement()); - } - /** * This method is called when a widget is detached from the browser's * document. To receive notification before the PopupPanel is removed from the