Package com.google.gwt.user.client.ui.PopupPanel

Examples of com.google.gwt.user.client.ui.PopupPanel.PositionCallback


    }
  }

  private void showContextMenu(final Event event) {
    if (contextMenu != null) {
      contextMenu.setPopupPositionAndShow(new PositionCallback() {
        public void setPosition(int offsetWidth, int offsetHeight) {
          contextMenu.setPopupPosition(event.getClientX(), event.getClientY());
        }
      });
    }
View Full Code Here


                    tabBar.selectTab(index);
                  }
                });
              }
            }
            menu.setPopupPositionAndShow(new PositionCallback() {
              public void setPosition(int offsetWidth, int offsetHeight) {
                final Dimension box = WidgetHelper.getOffsetSize(tabBarMenuBtn);
                int left = DOM.getAbsoluteLeft(tabBarMenuBtn.getElement());
                if (left + offsetWidth > Window.getClientWidth()) {
                  left += box.width - offsetWidth;
View Full Code Here

                    break;
                }
            }
        }

        panel.setPopupPositionAndShow( new PositionCallback() {
            public void setPosition( int offsetWidth,
                                     int offsetHeight ) {
                panel.setPopupPosition( parent.getAbsoluteLeft()
                                                + offsetX,
                                        parent.getAbsoluteTop()
View Full Code Here

            }

            // clear previous values
            popup.setWidth("");
            popup.setHeight("");
            popup.setPopupPositionAndShow(new PositionCallback() {
                public void setPosition(int offsetWidth, int offsetHeight) {
                    final int w = offsetWidth;
                    final int h = offsetHeight;
                    final int browserWindowWidth = Window.getClientWidth()
                            + Window.getScrollLeft();
View Full Code Here

    showFilmstrip();
  }
 
  private void showFilmstrip() {
    if (allImages.size() > 1) {
      filmstripPopup.setPopupPositionAndShow(new PositionCallback() {
        @Override
        public void setPosition(int offsetWidth, int offsetHeight) {
          filmstripPopup.setPopupPosition(
              Window.getScrollLeft() + (Window.getClientWidth() - offsetWidth) / 2,
              Window.getScrollTop() + (Window.getClientHeight() - offsetHeight));
View Full Code Here

      });
    }
  }
 
  private void showPopup() {
    popup.setPopupPositionAndShow(new PositionCallback() {
      @Override
      public void setPosition(int offsetWidth, int offsetHeight) {
        popup.setPopupPosition(
            Window.getScrollLeft() + (Window.getClientWidth() - offsetWidth) / 2,
            Window.getScrollTop() + (Window.getClientHeight() - offsetHeight) / 2
View Full Code Here

    HTML html = new HTML(content, false);
    p.setWidget(html);
   
    widget.addFocusListener(new FocusListener() {
      public void onFocus(Widget sender) {
        p.setPopupPositionAndShow(new PositionCallback() {

          public void setPosition(int offsetWidth, int offsetHeight) {
           
            int left, top, height;
           
View Full Code Here

    Date viewData = getViewData(lastKey);
    Date date = (viewData == null) ? lastValue : viewData;
    datePicker.setCurrentMonth(date);
    datePicker.setValue(date);
    panel.setPopupPositionAndShow(new PositionCallback() {
      public void setPosition(int offsetWidth, int offsetHeight) {
        panel.setPopupPosition(lastParent.getAbsoluteLeft() + offsetX,
            lastParent.getAbsoluteTop() + offsetY);
      }
    });
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.PopupPanel.PositionCallback

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.