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

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


      int left = ww.getAbsoluteLeft();
      int top = ww.getAbsoluteTop() + ww.getOffsetHeight();

        MenuBar menu = new MenuBar(true);
//        menu.setStylePrimaryName("PopupMenu");
        final PopupPanel menuPopup = new PopupPanel(true);
       
        menu.addItem(new MenuItem("Sort up", new Command() {
        public void execute() {
          sortByColumn(colName, false);
          menuPopup.hide();
        }
        }));
        menu.addItem(new MenuItem("Sort down", new Command() {
        public void execute() {
          sortByColumn(colName, true);
          menuPopup.hide();
        }
        }));
       
        menuPopup.setWidget(menu);
        menuPopup.setPopupPosition(left, top);
      menuPopup.show();
    }
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

    albumsWidget.setEditHandler(new RowOperationHandler<Album>() {
      @Override
      public void handle(Album a) {
        AlbumForm af = new AlbumForm(a, em);
        final PopupPanel pp = new PopupPanel(true, true);
        af.setSaveHandler(new RowOperationHandler<Album>() {
          @Override
          public void handle(Album album) {
            em.flush();
            refreshUI();
            pp.hide();
          }
        });
        pp.setWidget(af);
        pp.setGlassEnabled(true);
        pp.show();
        af.grabFocus();
      }
    });

    resetEverythingButton.addClickHandler(new ClickHandler() {
      @Override
      public void onClick(ClickEvent event) {
        ((ErraiEntityManager) em).removeAll();
        preFillDatabaseIfEmpty();
        refreshUI();
      }
    });

    newAlbumButton.addClickHandler(new ClickHandler() {
      @Override
      public void onClick(ClickEvent event) {
        AlbumForm af = new AlbumForm(new Album(), em);
        final PopupPanel pp = new PopupPanel(true, true);
        af.setSaveHandler(new RowOperationHandler<Album>() {
          @Override
          public void handle(Album album) {
            em.persist(album);
            em.flush();
            refreshUI();
            pp.hide();
          }
        });
        pp.setWidget(af);
        pp.setGlassEnabled(true);
        pp.show();
        af.grabFocus();
      }
    });

    newArtistButton.addClickHandler(new ClickHandler() {
      @Override
      public void onClick(ClickEvent event) {
        ArtistForm af = new ArtistForm(new Artist(), em);
        final PopupPanel pp = new PopupPanel(true, true);
        af.setSaveHandler(new RowOperationHandler<Artist>() {
          @Override
          public void handle(Artist artist) {
            em.persist(artist);
            em.flush();
            refreshUI();
            pp.hide();
          }
        });
        pp.setWidget(af);
        pp.setGlassEnabled(true);
        pp.show();
        af.grabFocus();
      }
    });

    preFillDatabaseIfEmpty();
View Full Code Here

        rb.setHeader(HEADER_CONTENT_TYPE, APPLICATION_JSON);

        try {


            final PopupPanel loading = Feedback.loading(
                    Console.CONSTANTS.common_label_plaseWait(),
                    Console.CONSTANTS.common_label_requestProcessed(), new Feedback.LoadingCallback() {
                @Override
                public void onCancel() {

                }
            });

            rb.sendRequest(requestJSO, new RequestCallback(){
                @Override
                public void onResponseReceived(Request request, Response response) {
                    //System.out.println("response=");
                    //System.out.println(response.getText());
                    if(200 != response.getStatusCode()) {
                        onDeploymentFailed(deployment, response);
                        return;
                    }

                    loading.hide();
                    window.hide();
                    refresher.refreshView();

                    String operation = Console.CONSTANTS.common_label_addContent();
                    if (isUpdate) operation = Console.CONSTANTS.common_label_updateContent();
View Full Code Here

                onSelection(selectedValue);
            }
        });

        final String panelId = "popup_"+HTMLPanel.createUniqueId();
        popup = new PopupPanel(true, true) {

            @Override
            protected void onPreviewNativeEvent(Event.NativePreviewEvent event) {
                if (Event.ONKEYUP == event.getTypeInt()) {
                    if (event.getNativeEvent().getKeyCode() == ESCAPE) {
View Full Code Here

            int top = parent.getAbsoluteTop();

            int width = parent.getOffsetWidth();
            int height = parent.getOffsetHeight();

            p = new PopupPanel();
            //p.setStylePrimaryName("bpm-loading-overlay");
            p.setWidget(new Image("images/loading_lite.gif"));
            p.setPopupPosition(left+(width/2)-15, top+(height/2)-15);
            p.show();
View Full Code Here

    public PopupCell(String title, PopupCellDelegate delegate) {
        super("click", "keydown");

        this.delegate = delegate;

        this.popup = new PopupPanel();
        this.popup.setStyleName("default-popup");
        this.popup.setWidget(delegate.asWidget());
        this.html = new SafeHtmlBuilder().appendHtmlConstant( "<div tabindex=\"-1\" class='cell-popup'>"+title+"</div>").toSafeHtml();
    }
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"});

        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("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(Console.CONSTANTS.common_label_settings());
        settings.addStyleName("footer-link");
View Full Code Here

    @Override
    public void enableDisableDeployment(final DeploymentRecord record) {


        final PopupPanel loading = Feedback.loading(
                Console.CONSTANTS.common_label_plaseWait(),
                Console.CONSTANTS.common_label_requestProcessed(),
                new Feedback.LoadingCallback() {
                    @Override
                    public void onCancel() {

                    }
                });

        deploymentStore.enableDisableDeployment(record, new SimpleCallback<DMRResponse>() {

            @Override
            public void onSuccess(DMRResponse response) {
                loading.hide();

                ModelNode result = response.get();

                if(result.isFailure())
                {
View Full Code Here

    public void addToServerGroup(
            final DeploymentRecord deployment,
            final boolean enable,
            Set<ServerGroupSelection> selection) {

        final PopupPanel loading = Feedback.loading(
                Console.CONSTANTS.common_label_plaseWait(),
                Console.CONSTANTS.common_label_requestProcessed(),
                new Feedback.LoadingCallback() {
                    @Override
                    public void onCancel() {

                    }
                });


        Set<String> names = new HashSet<String>();
        for(ServerGroupSelection group : selection)
            names.add(group.getName());

        deploymentStore.addToServerGroups(names, enable, deployment, new SimpleCallback<DMRResponse>() {

            @Override
            public void onSuccess(DMRResponse response) {

                loading.hide();

                ModelNode result = response.get();

                if(result.isFailure())
                {
View Full Code Here

TOP

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

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.