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

Examples of com.google.gwt.user.client.ui.PopupPanel$ResizeAnimation


        });

  }

  private void showNewUserNameRequestPopupPanel() {
    confirmPopup = new PopupPanel(false, true);
    VerticalPanel panel = new VerticalPanel();
    panel.add(new Label("What is your login Name?"));
    final TextBox textBox = new TextBox();
    panel.add(textBox);
    Button ok = new Button("OK");
View Full Code Here


    initSlotTable();
  }

  private void initImagePopup() {
    this.handlerManager = new HandlerManager(this);
    this.imagePopup = new PopupPanel(true);
    this.imagePopup.setAnimationEnabled(true);
    this.image = new Image();
    this.image.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        ProductEditView.this.imagePopup.hide();
View Full Code Here

        // If left/top are set from a previous doCenter() call, and our content
        // has changed, we may get a bogus getOffsetWidth because our new content
        // is wrapping (giving a lower offset width) then it would without the
        // previous left. Clearing left/top to avoids this.
        PopupPanel popup = asPopupPanel();
        Element elem = popup.getElement();
        elem.getStyle().clearLeft();
        elem.getStyle().clearTop();

        int left = (Window.getClientWidth() - popup.getOffsetWidth()) >> 1;
        int top = (Window.getClientHeight() - popup.getOffsetHeight()) >> 1;
        popup.setPopupPosition(Math.max(Window.getScrollLeft() + left, 0), Math.max(
                Window.getScrollTop() + top, 0));
    }
View Full Code Here

   * @param picker the picker to drop down from the date box
   * @param format to use to parse and format dates
   */
  public DateBox(DatePicker picker, Date date, Format format) {
    this.picker = picker;
    this.popup = new PopupPanel(true);
    assert format != null : "You may not construct a date box with a null format";
    this.format = format;

    popup.addAutoHidePartner(box.getElement());
    popup.setWidget(picker);
View Full Code Here

   * @param key This key is used to get the i18n text that should be displayed. This key will be passed as argument to the <code>ValidationMessages.getDescriptionMessage</code> method.
   * @param widget The widget that should show a popup description when it gets the focus.
   */
  public void addDescription(String key, final TextBoxBase widget) {
   
    final PopupPanel p = new PopupPanel(true);
   
    String content = messages.getDescriptionMessage(key);
   
    if(localeInfo.isRTL())
      content = "<div align=\"right\">" + content + "</div>";
   
    HTML html = new HTML(content, false);
    p.setWidget(html);
   
   
    widget.addFocusHandler(new FocusHandler() {

      public void onFocus(FocusEvent event) {
        p.setPopupPositionAndShow(new PositionCallback() {

          public void setPosition(int offsetWidth, int offsetHeight) {
           
            int left = calculateLeft(p, widget);
            int top = calculateTop(p, widget);

            p.setPopupPosition(left, top);
          }
        });       
      }
    });
   
    widget.addBlurHandler(new BlurHandler() {

      public void onBlur(BlurEvent event) {
        p.hide();
      }
     
    });
  }
View Full Code Here

 
  @Inject
  EditorPropertyManager(EditorPropertyPanel popupPanel) {
    this.popupPanel = popupPanel;
   
    popup = new PopupPanel();
    popup.setAnimationEnabled(true);
    popup.setGlassEnabled(true);
    popup.setAutoHideEnabled(false);
    popup.setSize("640px", "480px");
   
View Full Code Here

   * you wanted override them use the css selector div.chrono-infoWindow-content.
   *
   * FIXME: (MCM) this should be a unique instance of popup: ask Shawn
   */
  public InfoWindow createInfoWindow(String html, double x, double y) {
    final PopupPanel pp = new DecoratedPopupPanel(true);
    pp.addStyleName("chrono-infoWindow");
    Widget content = new HTML(html);
    content.setStyleName("chrono-infoWindow-content");
    pp.setWidget(content);
    pp.setPopupPosition(getElement().getAbsoluteLeft() + (int)x, getElement().getAbsoluteTop() + (int)y);

    GssProperties markerProperties = gssContext.getPropertiesBySelector("marker");
    if (markerProperties != null) {
      pp.getElement().getStyle().setBackgroundColor(markerProperties.bgColor.toString());
      pp.getElement().getStyle().setColor(markerProperties.color.toString());
      pp.getElement().getStyle().setProperty("fontFamily", markerProperties.fontFamily.toString());
      pp.getElement().getStyle().setProperty("fontSize", markerProperties.fontSize.toString());
      pp.getElement().getStyle().setPadding(5, Unit.PX);
    }
    pp.getElement().getStyle().setZIndex(9999);
    pp.show();
   
    return new BrowserInfoWindow(this, pp);
  }
View Full Code Here

    HTML h = new HTML(title);
    h.addStyleName("clipLink");
    h.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        PopupPanel p = new PopupPanel(true);
        p.addStyleName("keepPopup");
        p.setWidget(result.getHtml());
        Widget w = (Widget) event.getSource();
        p.setPopupPosition(w.getAbsoluteLeft() + 5, w.getAbsoluteTop()
            + w.getOffsetHeight() + 5);
        p.show();
      }
    });
    clips.add(h);
  }
View Full Code Here

    public Widget asWidget() {

        final LayoutPanel layout = new LayoutPanel();
        layout.setStyleName("footer-panel");

        final PopupPanel toolsPopup = new DefaultPopup(DefaultPopup.Arrow.BOTTOM);


        final List<String[]> toolReference = new ArrayList<String[]>();
        toolReference.add(new String[]{"Management Model", "browser"});
        toolReference.add(new String[]{"Expression Resolver", "expressions"});

        if(diagnostics.isEnabled())
        {
            toolReference.add(new String[]{"Diagnostics", "debug-panel"});
        }

        // only enabled in dev mode
        if(!GWT.isScript())
        {
            toolReference.add(new String[] {"Modelling", "mbui-workbench"});
            toolReference.add(new String[] {"Resource Access", "access-log"});
            StringBuilder runAsRole = new StringBuilder("Run as");
            if (Preferences.has(RUN_AS_ROLE)) {
                runAsRole.append(" ").append(Preferences.get(RUN_AS_ROLE));
            } else {
                runAsRole.append("...");
            }
            toolReference.add(new String[] {runAsRole.toString(), "run-as-role"});
        }

        final VerticalPanel toolsList = new VerticalPanel();
        toolsList.getElement().setAttribute("width", "160px");

        for(final String[] tool : toolReference)
        {
            InlineLink browser = new InlineLink(tool[0]);
            browser.getElement().setAttribute("style", "margin:4px");
            browser.addClickHandler(new ClickHandler() {
                @Override
                public void onClick(ClickEvent clickEvent) {
                    toolsPopup.hide();
                    placeManager.revealPlace(
                            new PlaceRequest(NameTokens.ToolsPresenter).with("name", tool[1])
                    );
                }
            });

            toolsList.add(browser);
        }
        toolsPopup.setWidget(toolsList);

        final HTML toolsLink = new HTML("<i class='icon-caret-up'></i>&nbsp;"+"Tools");
        toolsLink.addStyleName("footer-link");
        toolsLink.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent clickEvent) {

                int listHeight = toolsList.getWidgetCount() * 25;

                toolsPopup.setPopupPosition(
                        toolsLink.getAbsoluteLeft()-45,
                        toolsLink.getAbsoluteTop()-(listHeight-25)-50

                );

                toolsPopup.setWidth("165");
                toolsPopup.setHeight(listHeight +"");

                toolsPopup.show();
            }
        });

        HTML settings = new HTML("<i class='icon-wrench'></i>&nbsp;"+Console.CONSTANTS.common_label_settings());
        settings.addStyleName("footer-link");
View Full Code Here

    public Widget asWidget() {

        final LayoutPanel layout = new LayoutPanel();

        final PopupPanel toolsPopup = new DefaultPopup(DefaultPopup.Arrow.BOTTOM);

        final List<String[]> toolReference = new ArrayList<String[]>();
        toolReference.add(new String[]{"Management Model", "browser"});
        toolReference.add(new String[]{"Expression Resolver", "expressions"});

        if(diagnostics.isEnabled())
        {
            toolReference.add(new String[]{"Diagnostics", "debug-panel"});
        }

        // only enabled in dev mode
        if(!GWT.isScript())
        {
            toolReference.add(new String[] {"Modelling", "mbui-workbench"});
            toolReference.add(new String[] {"Resource Access", "access-log"});
        }

        // TODO: Remove https://issues.jboss.org/browse/HAL-100
        // This is also used within the DMRHandler ...
        StringBuilder runAsRole = new StringBuilder("Run as");
        if (Preferences.has(RUN_AS_ROLE)) {
            runAsRole.append(" ").append(Preferences.get(RUN_AS_ROLE));
        } else {
            runAsRole.append("...");
        }
        toolReference.add(new String[] {runAsRole.toString(), "run-as-role"});

        final VerticalPanel toolsList = new VerticalPanel();
        toolsList.getElement().setAttribute("width", "160px");

        for(final String[] tool : toolReference)
        {
            InlineLink browser = new InlineLink(tool[0]);
            browser.getElement().setAttribute("style", "margin:4px");
            browser.addClickHandler(new ClickHandler() {
                @Override
                public void onClick(ClickEvent clickEvent) {
                    toolsPopup.hide();
                    placeManager.revealPlace(
                            new PlaceRequest(NameTokens.ToolsPresenter).with("name", tool[1])
                    );
                }
            });

            toolsList.add(browser);
        }
        toolsPopup.setWidget(toolsList);

        final HTML toolsLink = new HTML("<i class='icon-caret-up'></i>&nbsp;"+"Tools");
        toolsLink.addStyleName("footer-link");
        toolsLink.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent clickEvent) {

                int listHeight = toolsList.getWidgetCount() * 25;

                toolsPopup.setPopupPosition(
                        toolsLink.getAbsoluteLeft()-45,
                        toolsLink.getAbsoluteTop()-(listHeight-25)-50

                );

                toolsPopup.setWidth("165");
                toolsPopup.setHeight(listHeight +"");
                toolsPopup.show();
            }
        });

        HTML settings = new HTML("<i class='icon-wrench'></i>&nbsp;"+Console.CONSTANTS.common_label_settings());
        settings.addStyleName("footer-link");
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.PopupPanel$ResizeAnimation

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.