Package org.jitterbit.application.ui.ask

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


    private boolean checkEmptyPassword() {
        char[] pwd_1 = pwdField_1.getPassword();
        char[] pwd_2 = pwdField_2.getPassword();
        boolean ret = true;
        if (pwd_1.length == 0 && pwd_2.length == 0) {
            Answer answer = Ask.yesNoOrCancel(
                            inputPanel,
                            PackageResources.Empty.MESSAGE,
                            PackageResources.Empty.TITLE,
                            Option.YES,
                            Type.WARNING);
            ret = answer.isYes();
        }
        return ret;
    }
View Full Code Here


        }
        return true;
    }

    private boolean promptForSave() {
        Answer answer = Ask.yesNoOrCancel(editorPanel, "Do you want to save your changes?", "Save?");
        if (answer.isYes()) {
            // Save the data and allow removal
            return triggerSave();
        } else if (answer.isNo()) {
            // Do not save the data, but allow removal
            return true;
        } else if (answer.isCancel()) {
            // Do not save the data, and veto removal.
            return false;
        }
        throw new IllegalStateException("Unexpected answer: " + answer);
    }
View Full Code Here

            DatabaseColumn fk = (DatabaseColumn) selection.getRightObject();
            String message = String.format(
                            "The columns %s and %s are selected, but not joined.\n\nDo you want to join them?",
                            pk.getName(),
                            fk.getName());
            Answer a = Ask.yesNoOrCancel(message, "Join Selected Columns?");
            if (a.isCancel()) {
                return false;
            }
            if (a.isYes()) {
                lists.addConnection(pk, fk);
            }
        }
        return true;
    }
View Full Code Here

            this.currentServer = current;
        }

        @Override
        public Boolean get() {
            Answer answer = Ask.yesNoOrCancel(
                            getQuestion(),
                            getString("DownloadDriversPrompt.Title"));
            return answer.isYes();

        }
View Full Code Here

        public Prompter(ServerInfo current) {
            this.currentServer = current;
        }

        public Boolean ask() {
            Answer answer = Ask.yesNoOrCancel(
                            getQuestion(),
                            getString("DownloadDriversPrompt.Title"));
            return answer.isYes();

        }
View Full Code Here

        return isChangeAllowedByUser != null && !isChangeAllowedByUser.booleanValue();
    }
   
    private boolean isChangeAllowedByUser() {
        if (isChangeAllowedByUser == null) {
            Answer answer = Ask.yesOrNo("Do you want to change the mapping to use the first instance for each source?",
                "Single instance target cannot be mapped by multiple instance source.");
            isChangeAllowedByUser = answer.isYes();
        }
        return isChangeAllowedByUser;
    }
View Full Code Here

    }

  @Override
  public void dispose(){
    if (isDirty()) {
        Answer answer = Ask.yesNoOrCancel("Do you want to migrate the mappings?", "The migration page is dirty!");
        if (answer.isCancel()) {
                // Do not save the data, and veto removal.
                setVisible(true);
                return;
        } else if (answer.isYes()) {
                // Save the data and allow removal
                save();
            }
    }
    super.dispose();
View Full Code Here

            }
            if (m_where == c_TreeMapperTarget && m_TreeMapper != null
                            && m_TreeMapper.getMappingManager().findMapping(node.m_deName) != null) {
                myPopupMenu.addMenuItem(cmd_delete_mapping);
            } else if (node.isUndefinedDataType() && !m_bIsLdapTarget) {
                Answer a = Ask.okOrCancel("Change data type to XMLType?", "Undefined data type");
                if (a.isOk()) {
                    int k1 = node.getDisplay().indexOf(NodeConstants.UNKNOWN), k2 = k1 + NodeConstants.UNKNOWN.length();
                    String newDisplay = node.getDisplay().substring(0, k1) + "(XMLType)"
                                    + node.getDisplay().substring(k2);
                    node.setDisplay(newDisplay);
                }
View Full Code Here

        File newLocation = new File(parent, newName);
        return newLocation;
    }

    private boolean overwriteExisting(File newLocation) {
        Answer a = Ask.continueOrCancel(
                        null,
                        "A file or folder with the path " + newLocation.getAbsolutePath() +
                            " already exists and will be overwritten.\n\nDo you want to continue?",
                        "Overwrite Existing?",
                        Option.CANCEL,
                        Type.WARNING);
        if (a.isContinue()) {
            try {
                FileUtils.forceDelete(newLocation);
                return true;
            } catch (IOException ex) {
                ErrorLog.attention(ProjectRenamer.class,
View Full Code Here

        }

        private boolean promptUserForOverWrite(File rootDir) {
            String msg = getFolderExistsMessage(rootDir.getAbsolutePath());
            String title = Strings.get("Launcher.WarningTitle");
            Answer answer = Ask.yesNoOrCancel(null, msg, 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.