title: Get GWT DialogBox absolute position - onLoad/onAttach/show do not helps
body: <p>I am stuck in getting an absolute position of <code>DialogBox</code>. I know it is the common problem (and strange workaround) for  <code>PopupPanel</code> (which is parent to <code>DialogBox</code>) to <em>set</em> it, but what if I want to <em>get</em> it, what is the exact moment when the box attached to DOM? Neither overriding <code>show</code> nor <code>onAttach</code> nor <code>show</code> does not help:</p>
  
  <pre><code>class MyDialog extends DialogBox {
  
      public MyDialog(. . .) {
          ComplexPanel vert = new VerticalPanel();
          vert.add("Test");
          vert.add(new Button("Close", new ClickHandler() {
              @Override
              public void onClick(ClickEvent event) {
                  MyDialog.this.hide();
              }
          }));
          setWidget(vert);
  
          this.addAttachHandler(new AttachEvent.Handler() {
  
              @Override
              public void onAttachOrDetach(AttachEvent event) {
                  if (event.isAttached()) Log.debug("attach:"+MyDialog.this.getAbsoluteLeft() +";"+
                                                              MyDialog.this.getAbsoluteTop());
              }
          });
      }
  
      @Override
      protected void onLoad() {
          super.onLoad();
          Log.debug("load:"+this.getAbsoluteLeft() +";"+this.getAbsoluteTop());
      }
  
      @Override
      public void show() {
          super.show();
          Log.debug("show:"+this.getAbsoluteLeft() +";"+this.getAbsoluteTop());
      }
  
  }
  </code></pre>
  
  <p>So when I call <code>new MyDialog().show();</code>, all this lines do log <code>0;0</code>, however dialog is positioned in center of a page. But what I want is the sum of the chain of <code>offsetParent</code> positions. (And they are 0 in these moments even in JavaScript, if use JSNI to check this)</p>
  
  <p>Again, <code>setPopupPositionAndShow</code> allows to <em>set</em> position but not get it :(</p>