Package com.gwtext.client.widgets.event

Examples of com.gwtext.client.widgets.event.ButtonListenerAdapter


        .format(
            "bpeleditor/BPELEditor.html?uuid={0}&fileName={1}&dirName={2}&servletName={3}&isNew={4}",
            new String[] { uuid, fileName, dirName, servletName,
                isNew });

    viewSource.addListener(new ButtonListenerAdapter() {
      public void onClick(com.gwtext.client.widgets.Button button,
          EventObject e) {

        Window.open(url, "_" + fileName, null);
View Full Code Here



        loadPackages();
        Toolbar tb = new Toolbar();
        final ToolbarButton restorePackage = new ToolbarButton();
        restorePackage.addListener(new ButtonListenerAdapter() {
              public void onClick(
                  com.gwtext.client.widgets.Button button,
                  EventObject e) {
                restorePackage(packages.getValue(packages.getSelectedIndex()));
              }

            });
        restorePackage.setText(constants.RestoreSelectedPackage());
        tb.addButton(restorePackage);




        final ToolbarButton delPackage = new ToolbarButton();
        delPackage.setText(constants.PermanentlyDeletePackage());
        delPackage.addListener(new ButtonListenerAdapter() {
              public void onClick(
                  com.gwtext.client.widgets.Button button,
                  EventObject e) {
                if (Window.confirm(constants.AreYouSurePackageDelete())) {
                  deletePackage(packages.getValue(packages.getSelectedIndex()));
                }
              }
        });
        tb.addButton(delPackage);



        pf.startSection(constants.ArchivedPackagesList());

        pf.addRow(tb);
        pf.addRow(packages);


        pf.endSection();

        tb = new Toolbar();
        final ToolbarButton restoreAsset = new ToolbarButton();
        restoreAsset.setText(constants.RestoreSelectedAsset());
        tb.addButton(restoreAsset);
        restoreAsset.addListener(new ButtonListenerAdapter() {
              public void onClick(com.gwtext.client.widgets.Button button, EventObject e) {
                      if (grid.getSelectedRowUUIDs() == null) {
                        Window.alert(constants.PleaseSelectAnItemToRestore());
                        return;
                      }
                        RepositoryServiceFactory.getService().archiveAssets( grid.getSelectedRowUUIDs(), false, new GenericCallback() {
                            public void onSuccess(Object arg0) {
                                Window.alert(constants.ItemRestored());
                                grid.refreshGrid();
                            }
                        });
              };
        });


        final ToolbarButton deleteAsset = new ToolbarButton();
        deleteAsset.setText(constants.DeleteSelectedAsset());
        tb.addButton(deleteAsset);

        deleteAsset.addListener(
            new ButtonListenerAdapter() {
              public void onClick(
                  com.gwtext.client.widgets.Button button,
                  EventObject e) {
                      if (grid.getSelectedRowUUIDs() == null) {
                        Window.alert(constants.PleaseSelectAnItemToPermanentlyDelete());
View Full Code Here

      if (ruleFlowViewer != null && parameterPanel != null) {
        Toolbar tb = new Toolbar();

        ToolbarButton viewSource = new ToolbarButton();
        viewSource.setText(constants.OpenEditorInNewWindow());
        viewSource.addListener(new ButtonListenerAdapter() {
          public void onClick(
              com.gwtext.client.widgets.Button button,
              EventObject e) {
            doViewDiagram();
View Full Code Here

    tb.addItem(new ToolbarTextItem(constants.CurrentlyConfiguredUsers()));
    tb.addItem(new ToolbarSeparator());

    layout.add(grid);
    ToolbarButton reload = new ToolbarButton(constants.Reload1());
    reload.addListener(new ButtonListenerAdapter() {
          public void onClick(Button button, EventObject e) {
            refresh();
          }
        });
    tb.addButton(reload);


    grid.addGridRowListener(new GridRowListenerAdapter() {
      @Override
      public void onRowDblClick(GridPanel grid, int rowIndex,
          EventObject e) {
        String userName = grid.getSelectionModel().getSelected().getAsString("userName")//NON-NLS
        showEditor(userName);
      }
    });

    ToolbarButton create = new ToolbarButton(constants.CreateNewUserMapping());
    create.addListener(new ButtonListenerAdapter() {
          public void onClick(Button button, EventObject e) {
            final FormStylePopup form = new FormStylePopup("images/snapshot.png", //NON-NLS
                constants.EnterNewUserName());
            final TextBox userName = new TextBox();
            form.addAttribute(constants.NewUserName(), userName);

            com.google.gwt.user.client.ui.Button create = new com.google.gwt.user.client.ui.Button(constants.OK());
            form.addAttribute("", create);
            create.addClickListener(new ClickListener() {
              public void onClick(Widget w) {
                    if (userName.getText() != null && userName.getText().length() !=0) {
                      RepositoryServiceFactory.getService().createUser(userName.getText(), new GenericCallback() {
                        public void onSuccess(Object a) {
                          refresh();
                          showEditor(userName.getText());
                        }   
                        public void onFailure(Throwable t) {
                                super.onFailure(t);
                              }
                  });
                  form.hide();
                }
              }
            });
           
            form.show();   
          }


        });
    tb.addButton(create);

    ToolbarButton delete = new ToolbarButton(constants.DeleteSelectedUser());
    delete.addListener(new ButtonListenerAdapter() {
          public void onClick(Button button, EventObject e) {
            final String userName = grid.getSelectionModel().getSelected().getAsString("userName"); //NON-NLS
                        if (userName != null && Window.confirm(Format.format(constants.AreYouSureYouWantToDeleteUser0(), userName))) {
              RepositoryServiceFactory.getService().deleteUser(userName, new GenericCallback() {
                public void onSuccess(Object a) {
View Full Code Here

    tb.addItem(new ToolbarSeparator());

    layout.add(g);

    ToolbarButton reload = new ToolbarButton(constants.Reload());
    reload.addListener(new ButtonListenerAdapter() {
      public void onClick(Button button, EventObject e) {
        layout.remove(g);
        refresh();
      }
    });

    tb.addButton(reload);
   
    ToolbarButton clean = new ToolbarButton(constants.Clean());
    clean.addListener(new ButtonListenerAdapter() {
      public void onClick(Button button, EventObject e) {
        layout.remove(g);
        cleanLog();
      }
    });
View Full Code Here

    }

    private void addCloseAllButton() {
        closeAllButton = new Button( constants.CloseAllItems() );
        closeAllButton.addListener( new ButtonListenerAdapter() {
            @Override
            public void onClick(Button button,
                                EventObject e) {
                if ( Window.confirm( constants.AreYouSureYouWantToCloseOpenItems() ) ) {
                    tp.clear();
View Full Code Here

                                     }
                                 };

                                 ToolbarButton refreshB = new ToolbarButton();
                                 refreshB.setText(constants.refreshList());
                                 refreshB.addListener( new ButtonListenerAdapter() {
                                     public void onClick(Button button,
                                                         EventObject e) {
                                         refresh.execute();
                                     }
                                 } );

                                 tb.addButton( refreshB );


                                 ToolbarButton openSelected = new ToolbarButton();
                                 openSelected.setText( constants.openSelected() );
                                 openSelected.addListener( new ButtonListenerAdapter() {
                                     public void onClick(Button button,
                                                         EventObject e) {
                                         Record[] selections = currentGrid.getSelectionModel().getSelections();
                                         for ( Record record : selections ) {
                                             String uuid = record.getAsString( "uuid" );
                                             editEvent.open( uuid );
                                         }
                                     }
                                 } );
                                 tb.addButton( openSelected );
                                 ToolbarButton openSelectedToSingleTab = new ToolbarButton();
                                 openSelectedToSingleTab.setText( constants.openSelectedToSingleTab() );
                                 openSelectedToSingleTab.addListener( new ButtonListenerAdapter() {
                                     public void onClick(Button button,
                                                         EventObject e) {
                                         Record[] selections = currentGrid.getSelectionModel().getSelections();
                                         MultiViewRow[] rows = new MultiViewRow[selections.length];
                                         for ( int i = 0; i < selections.length; i++ ) {
View Full Code Here

        ToolbarButton b = new ToolbarButton();
        b.setText( (forward) ? constants.Next() : constants.Previous());

        tb.addButton( b );

        b.addListener( new ButtonListenerAdapter() {
            public void onClick(Button button,
                                EventObject e) {
                if ( forward ) {
                    int newPos = currentCursorPosition - 2;
                    if ( newPos > 0 ) {
                        cursorPositions.push( newPos );
                    }
                } else {
                    cursorPositions.pop();
                }
                layout.clear();
                g.destroy();
                doGrid( source,
                        cm,
                        rd,
                        pageSize );
            }
        } );

        if ( !forward ) {
            ToolbarButton first = new ToolbarButton(constants.goToFirst());
            tb.addButton( first );
            first.addListener( new ButtonListenerAdapter() {
                @Override
                public void onClick(Button button,
                                    EventObject e) {
                    cursorPositions.clear();
                    cursorPositions.push( 0 );
View Full Code Here

        layout.setCellHeight(editor, "95%");
        layout.add(tb);

        ToolbarButton viewSource = new ToolbarButton();
        viewSource.setText(constants.ViewSource());
        viewSource.addListener(new ButtonListenerAdapter()  {
      public void onClick(
          com.gwtext.client.widgets.Button button,
          EventObject e) {
                doViewsource();
      }
    });

        //only show this for advanced users
        if (ExplorerLayoutManager.shouldShow(Capabilities.SHOW_PACKAGE_VIEW)) {
            tb.addButton(viewSource);
            tb.addSeparator();
        }

        ToolbarButton validate = new ToolbarButton();
        validate.setText(constants.Validate());
        validate.addListener(new ButtonListenerAdapter()  {
              public void onClick(
                  com.gwtext.client.widgets.Button button,
                  EventObject e) {
                doValidate();
              }
View Full Code Here

    private Toolbar createToolbar() {
        Toolbar toolbar = new Toolbar();

        ToolbarButton checkinAll = new ToolbarButton( constants.SaveAllChanges() );
        checkinAll.addListener( new ButtonListenerAdapter() {
            public void onClick(com.gwtext.client.widgets.Button button,
                                EventObject e) {
                checkin( false );
            }
        } );
        toolbar.addButton( checkinAll );
        ToolbarButton checkinAndCloseAll = new ToolbarButton( constants.SaveAndCloseAll() );
        toolbar.addButton( checkinAndCloseAll );
        checkinAndCloseAll.addListener( new ButtonListenerAdapter() {
            public void onClick(com.gwtext.client.widgets.Button button,
                                EventObject e) {
                checkin( true );
            }
        } );
View Full Code Here

TOP

Related Classes of com.gwtext.client.widgets.event.ButtonListenerAdapter

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.