Style cleanup for previous patch (r1152).
Suggested by: scottb
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@1153 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 eb7d149..c17a23f 100644
--- a/user/src/com/google/gwt/user/client/ui/PopupPanel.java
+++ b/user/src/com/google/gwt/user/client/ui/PopupPanel.java
@@ -25,10 +25,9 @@
/**
* 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
+ * 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>
@@ -240,10 +239,6 @@
return true;
}
- public boolean remove(Widget w) {
- return super.remove(w);
- }
-
public void removePopupListener(PopupListener listener) {
if (popupListeners != null) {
popupListeners.remove(listener);
@@ -251,10 +246,11 @@
}
/**
- * 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")
+ * 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();
@@ -290,9 +286,18 @@
DOM.setStyleAttribute(elem, "top", top + "px");
}
+ public void setTitle(String title) {
+ Element containerElement = getContainerElement();
+ if (title == null || title.length() == 0) {
+ DOM.removeElementAttribute(containerElement, "title");
+ } else {
+ DOM.setElementAttribute(containerElement, "title", title);
+ }
+ }
+
/**
* Sets whether this object is visible.
- *
+ *
* @param visible <code>true</code> to show the object, <code>false</code>
* to hide it
*/
@@ -301,9 +306,9 @@
// Because the panel is absolutely positioned, this will not create
// "holes" in displayed contents and it allows normal layout passes
// to occur so the size of the PopupPanel can be reliably determined.
- DOM.setStyleAttribute(getElement(), "visibility",
- visible ? "visible" : "hidden");
-
+ DOM.setStyleAttribute(getElement(), "visibility", visible ? "visible"
+ : "hidden");
+
// If the PopupImpl creates an iframe shim, it's also necessary to hide it
// as well.
impl.setVisible(getElement(), visible);
@@ -312,12 +317,13 @@
/**
* 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")
+ *
+ * @param width the new width of this panel's widget, in CSS units (e.g.
+ * "10px", "1em")
*/
- public void setWidth(String width) {
+ public void setWidth(String width) {
Widget childWidget = getWidget();
- if (childWidget != null) {
+ if (childWidget != null) {
childWidget.setWidth(width);
}
}
@@ -378,14 +384,4 @@
popupListeners.firePopupClosed(this, autoClosed);
}
}
-
- public void setTitle(String title) {
- Element containerElement = getContainerElement();
- if (title == null || title.length() == 0) {
- DOM.removeElementAttribute(containerElement, "title");
- } else {
- DOM.setElementAttribute(containerElement, "title", title);
- }
- }
}
-
diff --git a/user/src/com/google/gwt/user/client/ui/UIObject.java b/user/src/com/google/gwt/user/client/ui/UIObject.java
index 11d7f74..ef55535 100644
--- a/user/src/com/google/gwt/user/client/ui/UIObject.java
+++ b/user/src/com/google/gwt/user/client/ui/UIObject.java
@@ -612,5 +612,3 @@
p.removeChild(node);
}-*/;
}
-
-
diff --git a/user/src/com/google/gwt/user/client/ui/impl/PopupImplMozilla.java b/user/src/com/google/gwt/user/client/ui/impl/PopupImplMozilla.java
index 0b338d1..18fbe27 100644
--- a/user/src/com/google/gwt/user/client/ui/impl/PopupImplMozilla.java
+++ b/user/src/com/google/gwt/user/client/ui/impl/PopupImplMozilla.java
@@ -1,12 +1,12 @@
/*
* Copyright 2007 Google Inc.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -25,21 +25,23 @@
* This implementation is identical to the implementation provided by
* {@link com.google.gwt.user.client.ui.impl.PopupImpl} in the case where
* Mozilla is NOT running on the Mac.
- * <p/>
+ * <p>
* A different implemention is provided for the Mac in order to prevent
* scrollbars underneath the PopupPanel from being rendered on top of the
- * PopupPanel (issue #410). Unfortunately, the solution that fixes this
- * problem for the Mac causes a problem with dragging a
- * {@link com.google.gwt.user.client.ui.DialogBox} on Linux. While dragging
- * the DialogBox (especially diagonally), it jitters significantly.
- * <p/>
+ * PopupPanel (issue #410). Unfortunately, the solution that fixes this problem
+ * for the Mac causes a problem with dragging a
+ * {@link com.google.gwt.user.client.ui.DialogBox} on Linux. While dragging the
+ * DialogBox (especially diagonally), it jitters significantly.
+ * </p>
+ * <p>
* We did not introduce a deferred binding rule for Mozilla on the Mac because
* this is the first instance in which we have a Mozilla-related bug fix which
* does not work on all platforms.
- * <p/>
- * This implementation can be simplified in the event that the jittering
- * problem on Linux is fixed, or the scrollbar rendering problem on the Mac
- * is fixed.
+ * </p>
+ * <p>
+ * This implementation can be simplified in the event that the jittering problem
+ * on Linux is fixed, or the scrollbar rendering problem on the Mac is fixed.
+ * </p>
*/
public class PopupImplMozilla extends PopupImpl {
@@ -63,10 +65,12 @@
DOM.setInnerHTML(outerElem, "<div></div>");
// Mozilla determines the default stacking order for heavyweight elements
- // by their order on the page. If the PopupPanel is declared before another
- // heavyweight element on the page, then the scrollbars of the heavyweight
+ // by their order on the page. If the PopupPanel is declared before
+ // another
+ // heavyweight element on the page, then the scrollbars of the heavyweight
// element will still shine through the PopupPanel. By setting
- // 'overflow:auto' after all of the elements on the page have been rendered,
+ // 'overflow:auto' after all of the elements on the page have been
+ // rendered,
// the PopupPanel becomes the highest element in the stacking order.
DeferredCommand.addCommand(new Command() {
public void execute() {