Package org.jitterbit.application.ui.ask

Examples of org.jitterbit.application.ui.ask.Answer


    @Override
    protected void handleDeleteRequest(Node node) {
        if (m_gotFocus && node != null && m_TreeMapper.getMappingManager().hasMappings()) {
             m_TreeMapper.deleteMapping(new NodePath(node.m_deName));
             if(node.isPrecondition() && !node.isTargetMapped()) {
                 Answer a = Ask.yesOrNo("The condition expression has been removed. Do you also want to delete the condition node itself?",
                                 "Remove Condition Node?");
                 if (a.isYes()) {
                   node.m_parent.deletePreCondition();
                     refresh();
                 }
             }
         } else if (node != null && node.isPrecondition()) {
View Full Code Here


        return name;
    }

    private boolean canDestinationBeOverwritten(File destination) {
        String message = getOverwritePrompt(destination);
        Answer answer = Ask.yesOrNo(null, message, Strings.get("Prompt.Overwrite.Title"), Option.NO,
                        Type.WARNING);
        return answer.isYes();
    }
View Full Code Here

            @Override
            public Boolean get() {
                if (destinationFolder.exists()) {
                    return true;
                }
                Answer answer = Ask.yesOrNo("The folder \"" + destinationFolder
                                + "\" does not exist.\n\nDo you want to create it?",
                                "Destination folder does not exist");
                if (answer.isYes()) {
                    boolean created = destinationFolder.mkdirs();
                    if (created) {
                        return Boolean.TRUE;
                    }
                    Alert.error("The folder could not be created. Make sure you have sufficient permissions.",
View Full Code Here

            }
            super.setValueAt(aValue, rowIndex, columnIndex);
        }

        private boolean askAboutRemoval() {
            Answer answer = Ask.yesNoOrCancel("You have entered a value <= 0. Do you want to remove this table?",
                            "Remove Table?");
            return answer.isYes();
        }
View Full Code Here

        return true;
    }

    private boolean askPermissionToOverwriteExistingFile(File fileToUpload) {
        String msg = String.format("A file with the name {0} but with different content already exists on the server. Do you want to overwrite the existing file?", fileToUpload.getName());
        Answer answer = Ask.yesNoOrCancel(null, msg, "Overwrite?",
                Option.YES, Type.WARNING);
        return answer.isYes();
    }
View Full Code Here

            permissionsPanel.update(selectedUserOrGroup, cache.getPermissions(selectedUserOrGroup));
        }
    }

    private boolean promptSave() {
        Answer answer = Ask.yesNoOrCancel(getSaveQuestion(displayedEntity), Strings.get("Permissions.Page.Save.Title"));
        if (answer.isYes()) {
            onApply();
            return true;
        } else if (answer.isNo()) {
            onReset();
            return true;
        } else if (answer.isCancel()) {
            return false;
        }
        throw new IllegalStateException("Unexpected answer: " + answer);
    }
View Full Code Here

            warning.append("\n");
            warning.append(issue.getDescription());
        }
        warning.append("\n\n");
        warning.append("Do you want to continue?");
        Answer answer = Ask.yesOrNo(null, warning.toString(), "Warning - Continue?", Option.NO, Type.WARNING);
        if (answer.isNo()) {
            throw new ValidationAbortedException();
        }
    }
View Full Code Here

        copier.copy(startPoint);
    }

    private Set<IntegrationEntity> getItemsToExclude() {
        if (cascade.size() == 1) {
            Answer a = Ask.continueOrCancel(null, "\"" + startPoint.getName() +
                            "\" has no dependencies, so no other objects will be copied.", "No Dependencies",
                            Option.CONTINUE, Type.INFORMATION);
            return a.isContinue() ? new HashSet<IntegrationEntity>() : null;
        }
        DeepCopyItemSelector selector = new DeepCopyItemSelector(cascade);
        KongaDialog dialog = new WizardStyleDialog(UiUtils.getActiveWindow(), "Select Which Objects To Copy",
                        selector, KongaDialog.CONTINUE_CANCEL, true);
        dialog.setContinueButtonAsDefault();
View Full Code Here

    private static final class NameCollisionHandler implements ProjectNameConflictResolver {

        @Override
        public Resolution resolve(ProjectLocation location) {
            String msg = Strings.format("Recent.Rename.Overwrite", location.getLocationPath());
            Answer a = Ask.yesOrNo(null, msg, Strings.get("Recent.Rename.Overwrite.Title"), Option.NO, Type.WARNING);
            return a.isYes() ? Resolution.OVERWRITE : Resolution.CANCEL;
        }
View Full Code Here

        Alert.error(Strings.get("Recent.Delete.Open.Message"), Strings.get("Recent.Delete.Open.Title"));
        return false;
    }

    private boolean isWarningAccepted() {
        Answer answer = Ask.yesOrNo(
                        null,
                        Strings.get("Recent.Delete.Warning.Message"),
                        Strings.get("Recent.Delete.Warning.Title"),
                        Option.NO,
                        Type.WARNING);
        return answer.isYes();
    }
View Full Code Here

TOP

Related Classes of org.jitterbit.application.ui.ask.Answer

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.