Package com.google.gwt.user.client

Examples of com.google.gwt.user.client.Command


          parentMenu.addItem(actions[i].getActionCaption(), subMenu);
          someItemAdded = true;
        }
      }
      else {
        Command cmd = null;
        if (actions[i] instanceof IAddFormProvider) {
          IAddForm form = ((IAddFormProvider)actions[i]).getAddForm(null);
         
          if (AuthorizationProvider.isObjectAuthorized(form))
            cmd = new AddFormCommand(form);
View Full Code Here


        //Fire event to ensure parent Widgets correct their state depending on selection
        final HasValueChangeHandlers<OperatorSelection> source = this;
        final OperatorSelection selection = new OperatorSelection( selected,
                                                                   selectedText );
        Scheduler.get().scheduleFinally( new Command() {

            public void execute() {
                operatorChanged( selection );
                ValueChangeEvent.fire( source,
                                       selection );
View Full Code Here

    }

    protected void clickLoadHistory() {
        showBusyIcon();
        Scheduler scheduler = Scheduler.get();
        scheduler.scheduleDeferred( new Command() {
            public void execute() {
                loadHistoryData();
            }
        } );
View Full Code Here

                            restore.addClickHandler( new ClickHandler() {

                                public void onClick( ClickEvent event ) {
                                    restore( (Widget) event.getSource(),
                                            versionUUID,
                                            new Command() {
                                                public void execute() {
                                                    clientFactory.getEventBus().fireEvent( new RefreshAssetEditorEvent(uuid) );
                                                    pop.hide();
                                                }
                                            } );
View Full Code Here

    private void restore( Widget w,
                          final String versionUUID,
                          final Command refresh ) {

        final CheckinPopup pop = new CheckinPopup( constants.RestoreThisVersionQ() );
        pop.setCommand( new Command() {
            public void execute() {
                RepositoryServiceFactory.getAssetService().restoreVersion( versionUUID,
                        uuid,
                        pop.getCheckinComment(),
                        new GenericCallback<Void>() {
View Full Code Here

    }

    private void submit(Path path) {
        uploadWidget.submit( path,
                             URLHelper.getServletUrl(),
                             new Command() {

                                 @Override
                                 public void execute() {
                                     BusyPopup.close();
                                     notifySuccess();
                                 }

                             },
                             new Command() {

                                 @Override
                                 public void execute() {
                                     BusyPopup.close();
                                 }
View Full Code Here

        } else {
            this.format = formatToImport;
        }
      

        Scheduler.get().scheduleDeferred( new Command() {
            public void execute() {
                loadAssetList();
            }
        });
View Full Code Here

                String[] wsUUIDs = new String[selectedFacts.getItemCount()];
                for (int i = 0; i < selectedFacts.getItemCount(); i++) {
                    wsUUIDs[i] = selectedFacts.getValue(i);
                }

                WorkingSetManager.getInstance().applyWorkingSets(asset.getMetaData().getPackageName(), wsUUIDs, new Command() {
                        public void execute() {
                            LoadingPopup.close();
                            pop.hide();
                            modeller.refreshWidget();
                            modeller.verifyRule(null, true);
View Full Code Here

                                                                    this.fieldName,
                                                                    this.sce,
                                                                    this.constraint,
                                                                    !this.readOnly );
            if ( !this.readOnly ) {
                enumDropDown.setOnValueChangeCommand( new Command() {

                    public void execute() {
                        executeOnValueChangeCommand();
                    }
                } );
            }
            return enumDropDown;
        }

        //Date picker
        boolean isCEPOperator = false;
        if ( this.constraint instanceof HasOperator ) {
            isCEPOperator = SuggestionCompletionEngine.isCEPOperator( ((HasOperator) this.constraint).getOperator() );
        }
        if ( SuggestionCompletionEngine.TYPE_DATE.equals( this.fieldType ) || (SuggestionCompletionEngine.TYPE_THIS.equals( this.fieldType ) && isCEPOperator) ) {

            DatePickerLabel datePicker = new DatePickerLabel( constraint.getValue() );
            this.constraint.setValue( datePicker.getDateString() );

            if ( !this.readOnly ) {
                datePicker.addValueChanged( new ValueChanged() {

                    public void valueChanged(String newValue) {
                        executeOnValueChangeCommand();
                        constraint.setValue( newValue );
                    }
                } );

                return datePicker;

            } else {
                return new SmallLabel( this.constraint.getValue() );
            }
        }

        //Default editor
        if ( !this.readOnly ) {
            DefaultLiteralEditor dle = new DefaultLiteralEditor( this.constraint,
                                                                 this.isNumeric );
            dle.setOnValueChangeCommand( new Command() {

                public void execute() {
                    executeOnValueChangeCommand();
                }
            } );
View Full Code Here

            public void onExpressionTypeChanged(ExpressionTypeChangeEvent event) {
                System.out.println( "type changed: " + event.getOldType() + " -> " + event.getNewType() );
            }
        } );
        builder.addOnModifiedCommand( new Command() {

            public void execute() {
                executeOnValueChangeCommand();
            }
        } );
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.Command

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.