Examples of BooleanCallback


Examples of com.smartgwt.client.util.BooleanCallback

   */
  public void onClick(MenuItemClickEvent event) {
    if (feature != null && feature.isSelected()) {
      SC.confirm(
          I18nProvider.getGlobal().confirmDeleteFeature(feature.getLabel(), feature.getLayer().getLabel()),
          new BooleanCallback() {

            public void execute(Boolean value) {
              if (value) {
                feature.getLayer().deselectFeature(feature);
                mapWidget.getMapModel().getFeatureEditor()
View Full Code Here

Examples of com.smartgwt.client.util.BooleanCallback

                        disableAllFooterControls();
                        if (tableAction.getConfirmMessage() != null) {
                            String message = tableAction.getConfirmMessage().replaceAll("\\#",
                                String.valueOf(listGrid.getSelectedRecords().length));

                            SC.ask(message, new BooleanCallback() {
                                public void execute(Boolean confirmed) {
                                    if (null == confirmed) {
                                        refreshTableInfo();
                                    } else if (confirmed) {
                                        refreshTableInfo();
View Full Code Here

Examples of com.smartgwt.client.util.BooleanCallback

                public void executeAction(final ListGridRecord[] selection, Object actionValue) {
                    if (containsStorageNodeOrItsResource(selection)) {
                        // ask again if we are going to remove platform, storage node or its child
                        SC.confirm(MSG.view_inventory_resources_uninventoryStorageConfirm(),
                            new BooleanCallback() {
                            public void execute(Boolean test) {
                                if (test) uninventoryItems(selection);
                            }
                        });
                    } else {
View Full Code Here

Examples of com.smartgwt.client.util.BooleanCallback

            final EnhancedIButton okButton = new EnhancedIButton(MSG.common_button_ok(), ButtonColor.BLUE);
            okButton.setDisabled(true);
            okButton.addClickHandler(new com.smartgwt.client.widgets.events.ClickHandler() {
                public void onClick(ClickEvent clickEvent) {
                    SC.confirm(MSG.view_configEdit_confirm_1(), new BooleanCallback() {
                        @Override
                        public void execute(Boolean confirmed) {
                            if (confirmed) {
                                Object value = selectItem.getValue();
                                if (value != null) {
View Full Code Here

Examples of com.smartgwt.client.util.BooleanCallback

            removeField.setCanHide(false);

            removeField.addRecordClickHandler(new RecordClickHandler() {
                public void onRecordClick(final RecordClickEvent recordClickEvent) {
                    Log.debug("You want to delete: " + recordClickEvent.getRecordNum());
                    SC.confirm(MSG.view_configEdit_confirm_2(), new BooleanCallback() {
                        public void execute(Boolean confirmed) {
                            if (confirmed) {
                                if (summaryTable.getRecordList().getLength() <= listMin) {
                                    SC.say(MSG.view_configEdit_minBoundsExceeded(String.valueOf(listMin)));
                                } else {
View Full Code Here

Examples of com.smartgwt.client.util.BooleanCallback

                    String message = MSG.view_configEdit_confirm_3(Integer.toString(selectedValues.length), noun);
                    if (propertyList.getList().size() <= propertyDefinitionList.getMin()) {
                        SC.say("You cannot delete this entry because the minimum size bounds has been met: "
                            + propertyDefinitionList.getMin());
                    } else {
                        SC.ask(message, new BooleanCallback() {
                            public void execute(Boolean confirmed) {
                                if (confirmed) {
                                    for (int i = selectedValues.length - 1; i >= 0; i--) {
                                        String selectedValue = selectedValues[i];
                                        int index = Integer.valueOf(selectedValue);
View Full Code Here

Examples of com.smartgwt.client.util.BooleanCallback

        }

        String message = (!wizard.isCreateTemplate() && wizard.getSelectedTemplate().isPinned()) ? MSG
            .view_drift_wizard_pinTemplate_confirmPinned() : MSG.view_drift_wizard_pinTemplate_confirmNotPinned();

        SC.ask(message, new BooleanCallback() {
            public void execute(Boolean confirmed) {
                if (confirmed) {
                    isConfirmed = true;
                    nextPage();
View Full Code Here

Examples of com.smartgwt.client.util.BooleanCallback

        IButton deleteButton = new EnhancedIButton(MSG.common_button_delete(), ButtonColor.RED);
        //deleteButton.setIcon("subsystems/bundle/BundleVersionAction_Delete_16.png");
        deleteButton.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent clickEvent) {
                SC.ask(MSG.view_bundle_version_deleteConfirm(), new BooleanCallback() {
                    @Override
                    public void execute(Boolean confirmed) {
                        if (confirmed) {
                            doDeleteBundleVersion();
                        }
View Full Code Here

Examples of com.smartgwt.client.util.BooleanCallback

        resetButton = new EnhancedIButton(MSG.common_button_reset());
        resetButton.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent clickEvent) {
                String message = MSG.view_summaryDashboard_resetConfirm();

                SC.ask(message, new BooleanCallback() {
                    public void execute(Boolean confirmed) {
                        if (confirmed) {
                            dashboardView.delete();
                            setDashboard(getDefaultDashboard());
                            markForRedraw();
View Full Code Here

Examples of com.smartgwt.client.util.BooleanCallback

        IButton revertButton = new EnhancedIButton(MSG.view_bundle_revert(), ButtonColor.RED);
        //revertButton.setIcon(IconEnum.BUNDLE_REVERT.getIcon16x16Path());
        revertButton.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent clickEvent) {
                SC.ask(MSG.view_bundle_dest_revertConfirm(), new BooleanCallback() {
                    @Override
                    public void execute(Boolean aBoolean) {
                        if (aBoolean) {
                            new BundleRevertWizard(destination).startWizard();
                        }
                    }
                });
            }
        });
        actionLayout.addMember(revertButton);

        IButton purgeButton = new EnhancedIButton(MSG.view_bundle_purge(), ButtonColor.RED);
        //purgeButton.setIcon(IconEnum.BUNDLE_DESTINATION_PURGE.getIcon16x16Path());
        purgeButton.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent clickEvent) {
                SC.ask(MSG.view_bundle_dest_purgeConfirm(), new BooleanCallback() {
                    @Override
                    public void execute(Boolean aBoolean) {
                        if (aBoolean) {
                            BundleGWTServiceAsync bundleService = GWTServiceLookup.getBundleService(600000); // 10m should be enough right?
                            bundleService.purgeBundleDestination(destination.getId(), new AsyncCallback<Void>() {
                                @Override
                                public void onFailure(Throwable caught) {
                                    getErrorHandler().handleError(
                                        MSG.view_bundle_dest_purgeFailure(destination.getName()), caught);
                                }

                                @Override
                                public void onSuccess(Void result) {
                                    getMessageCenter().notify(
                                        new Message(MSG.view_bundle_dest_purgeSuccessful(destination.getName()),
                                            Message.Severity.Info));
                                    // Bundle destination is purged, go back to bundle destination view
                                    goToView(LinkManager.getBundleDestinationLink(bundle.getId(), destination.getId()),
                                        true);
                                }
                            });
                        }
                    }
                });
            }
        });
        checkIfDisabled(purgeButton);
        actionLayout.addMember(purgeButton);

        IButton deleteButton = new EnhancedIButton(MSG.common_button_delete(), ButtonColor.RED);
        //deleteButton.setIcon(IconEnum.BUNDLE_DESTINATION_DELETE.getIcon16x16Path());
        deleteButton.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                SC.ask(MSG.view_bundle_dest_deleteConfirm(), new BooleanCallback() {
                    @Override
                    public void execute(Boolean confirmed) {
                        if (confirmed) {
                            doDeleteBundleDestination();
                        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.