Now that PopupPanel.setWidth(String) and PopupPanel.setHeight(String) actually
set the dimensions of the PopupPanel's child widget instead of the PopupPanel
itself, there are behavioral differences between PopupPanel.getOffsetHeight()
and PopupPanel.getOffsetWidth() between GWT 1.3 and GWT 1.4RC.

PopupPanel.setWidth/PopupPanel.setHeight will only take effect if the panel has
a child widget set. If PopupPanel.setWidth /PopupPanel.setHeight is called
before a child widget for the panel has been set, then
PopupPanel.getOffsetWidth/PopupPanel.getOffsetHeight will NOT include the
width/height that was set. 

In the same scenario in GWT 1.3, the width/height that was set would be
included in the computation of getOffsetWidth/getOffsetHeight, regardless of
whether or not a child widget was set. 

To clarify this difference, javadoc has been added to the setWidth, setHeight,
getOffsetWidth, and getOffsetHeight methods.

Issue: 1148
Patch by: rdayal
Review by: jgw



git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@1222 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 1e511dc..430e3d3 100644
--- a/user/src/com/google/gwt/user/client/ui/PopupPanel.java
+++ b/user/src/com/google/gwt/user/client/ui/PopupPanel.java
@@ -112,6 +112,26 @@
   }
 
   /**
+    * Gets the panel's offset height in pixels. Calls to {@link #setHeight(String)}
+    * before the panel's child widget is set will not influence the offset height.
+    *
+    * @return the object's offset height
+    */
+   public int getOffsetHeight() {
+     return super.getOffsetHeight();
+   }
+
+   /**
+    * Gets the panel's offset width in pixels. Calls to {@link #setWidth(String)}
+    * before the panel's child widget is set will not influence the offset width.
+    *
+    * @return the object's offset width
+    */
+   public int getOffsetWidth() {
+     return super.getOffsetWidth();
+   }
+
+  /**
    * Gets the popup's left position relative to the browser's client area.
    * 
    * @return the popup's left position
@@ -250,6 +270,13 @@
     }
   }
 
+  /**
+   * Sets the height of the panel's child widget. If the panel's child widget
+   * has not been set, the height passed in will be cached and used to set
+   * the height immediately after the child widget is set.
+   *
+   * @param height the object's new height, in CSS units (e.g. "10px", "1em")
+   */
   public void setHeight(String height) {
     desiredHeight = height;
     maybeUpdateSize();
@@ -319,6 +346,13 @@
     maybeUpdateSize();
   }
 
+  /**
+   * Sets the width of the panel's child widget. If the panel's child widget
+   * has not been set, the width passed in will be cached and used to set
+   * the width immediately after the child widget is set.
+   *
+   * @param width the object's new width, in CSS units (e.g. "10px", "1em")
+   */
   public void setWidth(String width) {
     desiredWidth = width;
     maybeUpdateSize();