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

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


  private PopupPanel createButton(boolean autoHide, boolean modal,
      VerticalPanel panel) {
    final String text = " popup " + (modal ? " modal " : " non-modal ")
        + (autoHide ? "auto hide" : " persistent");
    panel.add(new HTML("<h2>" + text + "</h2>"));
    final PopupPanel p = new PopupPanel(autoHide, modal);
    p.setTitle(text);
    Button b = new Button("show", new ClickHandler() {
      public void onClick(ClickEvent event) {
        p.setPopupPosition(200,
            ((Button) event.getSource()).getAbsoluteTop() - 10);
        p.show();
      }
    });
    panel.add(b);
    p.setWidget(new Button("hide me", new ClickHandler() {
      public void onClick(ClickEvent event) {
        p.hide();
      }
    }));

    p.addCloseHandler(new CloseHandler<PopupPanel>() {
      public void onClose(CloseEvent<PopupPanel> event) {
        Window.setTitle("closing popup '" + p.getTitle() + "'. autohide:"
            + event.isAutoClosed());
      }
    });

    return p;
View Full Code Here


        else
        {
            success = Console.MESSAGES.successEnabled(record.getRuntimeName());
            failed = Console.MESSAGES.failedToEnable(record.getRuntimeName());
        }
        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 onFailure(final Throwable caught)
            {
                loading.hide();
                Console.error(failed, caught.getMessage());
            }

            @Override
            public void onSuccess(DMRResponse response)
            {
                loading.hide();
                ModelNode result = response.get();
                if (result.isFailure())
                {
                    Console.error(failed, result.getFailureDescription());
                }
View Full Code Here

        else
        {
            success = Console.MESSAGES.successEnabled(record.getRuntimeName());
            failed = Console.MESSAGES.failedToEnable(record.getRuntimeName());
        }
        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 onFailure(final Throwable caught)
            {
                loading.hide();
                Console.error(failed, caught.getMessage());
            }

            @Override
            public void onSuccess(DMRResponse response)
            {
                loading.hide();
                ModelNode result = response.get();
                if (result.isFailure())
                {
                    Console.error(failed, result.getFailureDescription());
                }
View Full Code Here

    @Override
    public void onAssignToServerGroup(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 onFailure(final Throwable caught)
            {
                loading.hide();
                Console.error(Console.MESSAGES.addingFailed("Deployment " + deployment.getRuntimeName()),
                        caught.getMessage());
            }

            @Override
            public void onSuccess(DMRResponse response)
            {
                loading.hide();
                ModelNode result = response.get();
                if (result.isFailure())
                {
                    Console.error(Console.MESSAGES.addingFailed("Deployment " + deployment.getRuntimeName()),
                            result.getFailureDescription());
View Full Code Here

    public void onRemoveContent(final DeploymentRecord deployment)
    {
        assert contentRepository != null : "Contentrepository must not be null!";
        List<String> assignedGroups = contentRepository.getServerGroups(deployment);

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

                    }
                });

        ModelNode operation = new ModelNode();
        operation.get(OP).set(COMPOSITE);
        operation.get(ADDRESS).setEmptyList();

        List<ModelNode> steps = new LinkedList<ModelNode>();
        for (String group : assignedGroups)
        {
            ModelNode groupOp = new ModelNode();
            groupOp.get(OP).set(REMOVE);
            groupOp.get(ADDRESS).add("server-group", group);
            groupOp.get(ADDRESS).add("deployment", deployment.getName());
            steps.add(groupOp);
        }

        ModelNode removeContentOp = new ModelNode();
        removeContentOp.get(OP).set(REMOVE);
        removeContentOp.get(ADDRESS).add("deployment", deployment.getName());
        steps.add(removeContentOp);
        operation.get(STEPS).set(steps);
        dispatcher.execute(new DMRAction(operation), new SimpleCallback<DMRResponse>()
        {
            @Override
            public void onSuccess(DMRResponse dmrResponse)
            {
                loading.hide();

                ModelNode result = dmrResponse.get();

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

      a.setText(nano.getName());
      a.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
          Widget toDisplay = nano.getPopup();
          if (toDisplay != null) {
            PopupPanel popup = new PopupPanel(true, true);
            ScrollPanel container = new ScrollPanel(toDisplay);
            container.setPixelSize(500, 500);
            popup.setWidget(container);
            popup.center();
          }
        }
      });
      // TODO: popup.
      grid.setWidget(row, 2, a);
View Full Code Here

        }
    }


    private static void displaySubsystemHelp(HasTreeItems subsysTree) {
        PopupPanel help = new PopupPanel();
        help.setStyleName("help-panel-open");
        help.getElement().setAttribute("style", "padding:15px");
        help.setWidget(new HTML("Mostly likely there is no UI provided to manage a particular subsystem. " +
                "It might as well be, that the profile doesn't include any subsystems at all."));

        Widget widget = (Widget) subsysTree;
        help.setPopupPosition(widget.getAbsoluteLeft()+50, widget.getAbsoluteTop()+20);
        help.setWidth("240px");
        help.setHeight("80px");
        help.setAutoHideEnabled(true);
        help.show();

    }
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

        this.txtDate = new DateTextBox( allowEmptyValue );
        this.format = DateTimeFormat.getFormat( DATE_FORMAT );
        this.datePicker = new DatePicker();

        // Pressing ESCAPE dismisses the pop-up loosing any changes
        this.panel = new PopupPanel( true,
                                     true ) {
            @Override
            protected void onPreviewNativeEvent(NativePreviewEvent event) {
                if ( Event.ONKEYUP == event.getTypeInt() ) {
                    if ( event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ESCAPE ) {
View Full Code Here

                    fireEvent(event);

                    // TODO: Add something here that says,
                    // hey, upload succeeded

                    final PopupPanel imagePopup = new PopupPanel(
                        true);
                    imagePopup.setAnimationEnabled(true);
                    imagePopup.setWidget(overlay);
                    imagePopup.setGlassEnabled(true);
                    imagePopup.setAutoHideEnabled(true);

                    imagePopup.center();

                  }
                });

          }
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.