title: GWT: PopupPanel setPopupPositionAndShow() delivers wrong offsetWidth and offsetHeight
body: <p>I have written my own <code>PopupPanel</code> in GWT. I want to show the popup relative to an other widget.  My implementation of the class looks like the following:</p>
  
  <pre class="lang-java prettyprint-override"><code>public class Popover extends PopupPanel implements PositionCallback {
  
      private static final Binder binder = GWT.create(Binder.class);
      private UIObject relative;
  
      interface Binder extends UiBinder&lt;Widget, Popover&gt; {
      }
  
      public Popover() {
          setWidget(binder.createAndBindUi(this));
          setStylePrimaryName("popover");
      }
  
      public void show(UIObject relative) {
  
          this.relative = relative;
          setPopupPositionAndShow(this);
  
      }
  
      public void setPosition(int offsetWidth, int offsetHeight) {
  
          if (relative != null) {
  
              int left = relative.getAbsoluteLeft();
              int top = relative.getAbsoluteTop();
              int width = relative.getOffsetWidth();
              int height = relative.getOffsetHeight();
  
              int topCenter = top + height / 2 - offsetHeight / 2;
  
  
              if (offsetWidth &lt; left) {
                  setPopupPosition(left - offsetWidth, topCenter);
              } else {
                  setPopupPosition(left + width, topCenter);
  
              }
          }
      }
  
  }
  </code></pre>
  
  <p>The problem is that <code>offsetWidth</code> and <code>offsetHeight</code> is always <code>10</code>?</p>
  
  <p>My <code>Popover.ui.xml</code> looks like the following:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;g:FlowPanel stylePrimaryName="popover"&gt;
      &lt;g:FlowPanel stylePrimaryName="arrow" /&gt;
      &lt;g:FlowPanel stylePrimaryName="inner"&gt;
          &lt;g:Label stylePrimaryName="title" text="New Label" /&gt;
          &lt;g:FlowPanel stylePrimaryName="content"&gt;
              &lt;g:Label text="Hallo" /&gt;
          &lt;/g:FlowPanel&gt;
      &lt;/g:FlowPanel&gt;
  &lt;/g:FlowPanel&gt;
  </code></pre>