Example usage for javax.swing JOptionPane QUESTION_MESSAGE

List of usage examples for javax.swing JOptionPane QUESTION_MESSAGE

Introduction

In this page you can find the example usage for javax.swing JOptionPane QUESTION_MESSAGE.

Prototype

int QUESTION_MESSAGE

To view the source code for javax.swing JOptionPane QUESTION_MESSAGE.

Click Source Link

Document

Used for questions.

Usage

From source file:com.vsquaresystem.safedeals.readyreckoner.ReadyReckonerService.java

public Boolean checkExistingDataa() throws IOException {
    logger.info("check ke andar hai bhai??");
    Vector checkCellVectorHolder = read();
    logger.info("checkCellVectorHolder line116 :{}", checkCellVectorHolder);
    logger.info("read in check line117 :{}", read());
    int excelSize = checkCellVectorHolder.size() - 1;
    System.out.println("excelSize" + excelSize);
    List<Readyreckoner> rs = readyReckonerDAL.getAll();
    JFrame parent = new JFrame();

    System.out.println("rs" + rs);
    int listSize = rs.size();
    logger.info("rsss:::::", listSize);
    System.out.println("rsss:::::" + listSize);
    if (excelSize == listSize || excelSize > listSize) {
        JDialog.setDefaultLookAndFeelDecorated(true);
        int response = JOptionPane.showConfirmDialog(null, "Do you want to continue?", "Confirm",
                JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
        switch (response) {
        case JOptionPane.NO_OPTION:
            System.out.println("No button clicked");
            JOptionPane.showMessageDialog(parent, "upload Cancelled");
            break;
        case JOptionPane.YES_NO_OPTION:
            saveToDatabase(checkCellVectorHolder);
            System.out.println("Yes button clicked");
            JOptionPane.showMessageDialog(parent, "Saved succesfully");
            break;
        case JOptionPane.CLOSED_OPTION:
            System.out.println("JOptionPane closed");
            break;
        }/*from ww w  . ja va 2 s .c o  m*/

    } else {
        System.out.println("No selected");
    }

    return true;
}

From source file:com.sshtools.common.ui.SshToolsApplicationInternalFrame.java

/**
 *
 *
 * @param application//from ww w  .  j a  v a 2s  . c  o m
 * @param panel
 *
 * @throws SshToolsApplicationException
 */
public void init(final SshToolsApplication application, SshToolsApplicationPanel panel)
        throws SshToolsApplicationException {
    this.panel = panel;
    this.application = application;

    if (application != null) {
        setTitle(ConfigurationLoader.getVersionString(application.getApplicationName(),
                application.getApplicationVersion())); // + " " + application.getApplicationVersion());
    }

    // Register the File menu
    panel.registerActionMenu(new SshToolsApplicationPanel.ActionMenu("File", "File", 'f', 0));
    // Register the Exit action
    if (showExitAction && application != null) {
        panel.registerAction(exitAction = new ExitAction(application, this));

        // Register the New Window Action
    }
    if (showNewWindowAction && application != null) {
        panel.registerAction(newWindowAction = new NewWindowAction(application));

        // Register the Help menu
    }
    panel.registerActionMenu(new SshToolsApplicationPanel.ActionMenu("Help", "Help", 'h', 99));

    // Register the About box action
    if (showAboutBox && application != null) {
        panel.registerAction(aboutAction = new AboutAction(this, application));

    }
    // Register the Changelog box action
    if (showChangelogBox && application != null) {
        panel.registerAction(changelogAction = new ChangelogAction(this, application));

    }
    panel.registerAction(faqAction = new FAQAction());
    panel.registerAction(beginnerAction = new BeginnerAction());
    panel.registerAction(advancedAction = new AdvancedAction());

    getApplicationPanel().rebuildActionComponents();

    JPanel p = new JPanel(new BorderLayout());

    if (panel.getJMenuBar() != null) {
        setJMenuBar(panel.getJMenuBar());
    }

    if (panel.getToolBar() != null) {
        JPanel t = new JPanel(new BorderLayout());
        t.add(panel.getToolBar(), BorderLayout.NORTH);
        t.add(toolSeparator = new JSeparator(JSeparator.HORIZONTAL), BorderLayout.SOUTH);
        toolSeparator.setVisible(panel.getToolBar().isVisible());

        final SshToolsApplicationPanel pnl = panel;
        panel.getToolBar().addComponentListener(new ComponentAdapter() {
            public void componentHidden(ComponentEvent evt) {
                log.debug("Tool separator is now " + pnl.getToolBar().isVisible());
                toolSeparator.setVisible(pnl.getToolBar().isVisible());
            }
        });
        p.add(t, BorderLayout.NORTH);
    }

    p.add(panel, BorderLayout.CENTER);

    if (panel.getStatusBar() != null) {
        p.add(panel.getStatusBar(), BorderLayout.SOUTH);
    }

    getContentPane().setLayout(new GridLayout(1, 1));
    getContentPane().add(p);

    // Watch for the frame closing
    //setDefaultCloseOperation(JInternalFrame.DO_NOTHING_ON_CLOSE);

    addVetoableChangeListener(new VetoableChangeListener() {

        public void vetoableChange(PropertyChangeEvent evt) throws PropertyVetoException {

            if (application != null) {
                application.closeContainer(SshToolsApplicationInternalFrame.this);
            } else {
                if (evt.getPropertyName().equals(IS_CLOSED_PROPERTY)) {
                    boolean changed = ((Boolean) evt.getNewValue()).booleanValue();
                    if (changed) {
                        int confirm = JOptionPane.showOptionDialog(SshToolsApplicationInternalFrame.this,
                                "Close " + getTitle() + "?", "Close Operation", JOptionPane.YES_NO_OPTION,
                                JOptionPane.QUESTION_MESSAGE, null, null, null);
                        if (confirm == 0) {
                            SshToolsApplicationInternalFrame.this.getDesktopPane()
                                    .remove(SshToolsApplicationInternalFrame.this);
                        }
                    }
                }
            }
        }
    });

    /*this.addWindowListener(new WindowAdapter() {
      public void windowClosing(WindowEvent evt) {
        if(application!=null)
          application.closeContainer(SshToolsApplicationFrame.this);
        else
          hide();
      }
         });
            
    // If this is the first frame, center the window on the screen
    /*Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
         boolean found = false;
         if (application!=null && application.getContainerCount() != 0) {
      for (int i = 0; (i < application.getContainerCount()) && !found;
           i++) {
        SshToolsApplicationContainer c = application.getContainerAt(i);
        if (c instanceof SshToolsApplicationFrame) {
          SshToolsApplicationFrame f = (SshToolsApplicationFrame) c;
          setSize(f.getSize());
          Point newLocation = new Point(f.getX(), f.getY());
          newLocation.x += 48;
          newLocation.y += 48;
          if (newLocation.x > (screenSize.getWidth() - 64)) {
    newLocation.x = 0;
          }
          if (newLocation.y > (screenSize.getHeight() - 64)) {
    newLocation.y = 0;
          }
          setLocation(newLocation);
          found = true;
        }
      }
         }
         if (!found) {
      // Is there a previous stored geometry we can use?
      if (PreferencesStore.preferenceExists(PREF_LAST_FRAME_GEOMETRY)) {
        setBounds(PreferencesStore.getRectangle(
    PREF_LAST_FRAME_GEOMETRY, getBounds()));
      }
      else {
        pack();
        UIUtil.positionComponent(SwingConstants.CENTER, this);
      }
         }*/

    pack();
}

From source file:fi.smaa.jsmaa.gui.JSMAAMainFrame.java

private boolean checkSaveCurrentModel() {
    if (!modelManager.getSaved()) {
        int conf = JOptionPane.showConfirmDialog(this, "Current model not saved. Do you want do save changes?",
                "Save changed", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE,
                ImageFactory.IMAGELOADER.getIcon(FileNames.ICON_STOP));
        if (conf == JOptionPane.CANCEL_OPTION) {
            return false;
        } else if (conf == JOptionPane.YES_OPTION) {
            if (!save()) {
                return false;
            }//from   w ww.j av  a2  s.co m
        }
    }
    return true;
}

From source file:components.DialogDemo.java

/** Creates the panel shown by the first tab. */
private JPanel createSimpleDialogBox() {
    final int numButtons = 4;
    JRadioButton[] radioButtons = new JRadioButton[numButtons];
    final ButtonGroup group = new ButtonGroup();

    JButton showItButton = null;//from w ww. ja v  a 2s.  c  o  m

    final String defaultMessageCommand = "default";
    final String yesNoCommand = "yesno";
    final String yeahNahCommand = "yeahnah";
    final String yncCommand = "ync";

    radioButtons[0] = new JRadioButton("OK (in the L&F's words)");
    radioButtons[0].setActionCommand(defaultMessageCommand);

    radioButtons[1] = new JRadioButton("Yes/No (in the L&F's words)");
    radioButtons[1].setActionCommand(yesNoCommand);

    radioButtons[2] = new JRadioButton("Yes/No " + "(in the programmer's words)");
    radioButtons[2].setActionCommand(yeahNahCommand);

    radioButtons[3] = new JRadioButton("Yes/No/Cancel " + "(in the programmer's words)");
    radioButtons[3].setActionCommand(yncCommand);

    for (int i = 0; i < numButtons; i++) {
        group.add(radioButtons[i]);
    }
    radioButtons[0].setSelected(true);

    showItButton = new JButton("Show it!");
    showItButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            String command = group.getSelection().getActionCommand();

            //ok dialog
            if (command == defaultMessageCommand) {
                JOptionPane.showMessageDialog(frame, "Eggs aren't supposed to be green.");

                //yes/no dialog
            } else if (command == yesNoCommand) {
                int n = JOptionPane.showConfirmDialog(frame, "Would you like green eggs and ham?",
                        "An Inane Question", JOptionPane.YES_NO_OPTION);
                if (n == JOptionPane.YES_OPTION) {
                    setLabel("Ewww!");
                } else if (n == JOptionPane.NO_OPTION) {
                    setLabel("Me neither!");
                } else {
                    setLabel("Come on -- tell me!");
                }

                //yes/no (not in those words)
            } else if (command == yeahNahCommand) {
                Object[] options = { "Yes, please", "No way!" };
                int n = JOptionPane.showOptionDialog(frame, "Would you like green eggs and ham?",
                        "A Silly Question", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null,
                        options, options[0]);
                if (n == JOptionPane.YES_OPTION) {
                    setLabel("You're kidding!");
                } else if (n == JOptionPane.NO_OPTION) {
                    setLabel("I don't like them, either.");
                } else {
                    setLabel("Come on -- 'fess up!");
                }

                //yes/no/cancel (not in those words)
            } else if (command == yncCommand) {
                Object[] options = { "Yes, please", "No, thanks", "No eggs, no ham!" };
                int n = JOptionPane.showOptionDialog(frame,
                        "Would you like some green eggs to go " + "with that ham?", "A Silly Question",
                        JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, options,
                        options[2]);
                if (n == JOptionPane.YES_OPTION) {
                    setLabel("Here you go: green eggs and ham!");
                } else if (n == JOptionPane.NO_OPTION) {
                    setLabel("OK, just the ham, then.");
                } else if (n == JOptionPane.CANCEL_OPTION) {
                    setLabel("Well, I'm certainly not going to eat them!");
                } else {
                    setLabel("Please tell me what you want!");
                }
            }
            return;
        }
    });

    return createPane(simpleDialogDesc + ":", radioButtons, showItButton);
}

From source file:de.juwimm.cms.gui.admin.PanUnitGroupPerUser.java

public void unload() {
    if (unitPickData.isModified() || groupPickData.isModified()) {
        int i = JOptionPane.showConfirmDialog(this, rb.getString("dialog.wantToSave"), "CMS",
                JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
        if (i == JOptionPane.YES_OPTION) {
            saveChanges(currentSelected);
        }/*  w w w  .  j av  a 2 s .com*/
        unitPickData.setModified(false);
        groupPickData.setModified(false);
    }
}

From source file:com.sshtools.tunnel.PortForwardingPane.java

protected void addPortForward() {
    PortForwardEditorPane editor = new PortForwardEditorPane();
    int option = JOptionPane.showConfirmDialog(this, editor, "Add New Tunnel", JOptionPane.OK_CANCEL_OPTION,
            JOptionPane.QUESTION_MESSAGE);
    if (option != JOptionPane.CANCEL_OPTION && option != JOptionPane.CLOSED_OPTION) {
        try {/*from   w  ww.  j  a  v a  2s  .co  m*/
            ForwardingClient forwardingClient = client; //.getForwardingClient();
            String id = editor.getForwardName();
            if (id.equals("x11")) {
                throw new Exception("The id of x11 is reserved.");
            }
            int i = model.getRowCount();
            if (editor.isLocal()) {
                ForwardingConfiguration f = forwardingClient.addLocalForwarding(id, editor.getBindAddress(),
                        editor.getLocalPort(), editor.getHost(), editor.getRemotePort());
                forwardingClient.startLocalForwarding(id);
                active.addConfiguration(f);
            } else {
                ForwardingConfiguration f = forwardingClient.addRemoteForwarding(id, editor.getBindAddress(),
                        editor.getLocalPort(), editor.getHost(), editor.getRemotePort());
                forwardingClient.startRemoteForwarding(id);
                active.addConfiguration(f);
            }

            if (i < model.getRowCount()) {
                table.getSelectionModel().addSelectionInterval(i, i);
            }
        } catch (Exception e) {
            sessionPanel.setAvailableActions();
            JOptionPane.showMessageDialog(this, e.getMessage(), "Error", JOptionPane.ERROR_MESSAGE);
        } finally {
            model.refresh();
            sessionPanel.setAvailableActions();
        }
    }
}

From source file:edu.clemson.cs.nestbed.client.gui.TestbedManagerFrame.java

private void doExit() {
    int choice;//from   w ww  .  j ava2s  .c o m

    choice = JOptionPane.showConfirmDialog(this, "Do you wish to exit NESTbed?", "Exit Confirmation",
            JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
    if (choice == JOptionPane.YES_OPTION) {
        log.fatal("Application shutdown per user request.");
        System.exit(0);
    }
}

From source file:GUI.ListOfOffres1.java

private static WebPanel createOffresPanel(final String url, final String title, String body, final int id,
        final int myId) throws IOException {

    final WebPanel offresPanel = new WebPanel(true);
    offresPanel.setPaintFocus(false);//w ww  .  j  a va 2 s . co  m
    WebLookAndFeel.install();
    WebLookAndFeel.setDecorateAllWindows(true);
    offresPanel.addMouseListener(new MouseAdapter() {
        @Override
        public void mouseClicked(MouseEvent e) {
            // Opening dialog
            Icon blueIcon = new ImageIcon("yourFile.gif");
            Object stringArray[] = { "Ovrir", "No" };
            int returnValue = JOptionPane.showOptionDialog(offresPanel, "Ouvrir Offre?",
                    "Vous voulez ouvrir une offre", JOptionPane.YES_NO_CANCEL_OPTION,
                    JOptionPane.QUESTION_MESSAGE, blueIcon, stringArray, stringArray[0]);
            switch (returnValue) {
            //                            case 0 :
            //                                openPleaseWait();
            //                                try {
            //                                    System.out.print("tehe id is :"+id);
            //                                    new OffreDAO().deleteOffre(id);
            //                                    openListOfOffresFrameagn(0,"");
            //                                } catch (IOException ex) {
            //                                    Logger.getLogger(ListOfOffres1.class.getName()).log(Level.SEVERE, null, ex);
            //                                }
            case 0:
                System.out.println("The return value" + returnValue);

                try {
                    //openPleaseWait();
                    new OneOffre().openListOfOffresFrameagn(id, myId);
                } catch (IOException ex) {
                    Logger.getLogger(ListOfOffres1.class.getName()).log(Level.SEVERE, null, ex);
                }

            }
            System.out.println("The return value" + returnValue);
            WebLookAndFeel.setDecorateDialogs(true);
        }
    });

    final WebPanel descPanel = new WebPanel(false);

    descPanel.add();
    descPanel.setOpaque(true);
    WebLabel descLabel = new WebLabel("<html>\n" + "<body>\n" + "\n" + "<h2>" + title + "</h2>\n" + "\n" + "<p>"
            + body + "</p>\n" + "\n" + "</body>\n" + "</html>");

    descPanel.add(descLabel);
    offresPanel.setPaintFocus(true);
    offresPanel.setMargin(10);
    // load the image once
    try {
        BufferedImage bi = ImageIO.read(new URL(url));
        ImageIcon img = new ImageIcon(bi);
        WebDecoratedImage img2 = new WebDecoratedImage(img);
        img2.setShadeWidth(0);
        offresPanel.add(img2);
        offresPanel.setPreferredSize(new Dimension(300, 400));
        GridLayout layoutPffresPanel = new GridLayout(2, 1);
        offresPanel.setLayout(layoutPffresPanel);
        offresPanel.add(descPanel);
    } catch (IOException e) {
        //or open no image found image
        BufferedImage image = ImageIO.read(new File("resources/no-image-found.jpg"));
        ImageIcon i1 = new ImageIcon(image);
        WebDecoratedImage img2 = new WebDecoratedImage(i1);
        img2.setShadeWidth(0);
        offresPanel.add(img2);
        offresPanel.setPreferredSize(new Dimension(300, 400));
        GridLayout layoutPffresPanel = new GridLayout(2, 1);
        offresPanel.setLayout(layoutPffresPanel);
        offresPanel.add(descPanel);
    }
    return offresPanel;
}

From source file:com.massabot.codesender.utils.FirmwareUtils.java

public synchronized static void initialize() {
    System.out.println("Initializing firmware... ...");
    File firmwareConfig = new File(SettingsFactory.getSettingsDirectory(), FIRMWARE_CONFIG_DIRNAME);

    // Create directory if it's missing.
    if (!firmwareConfig.exists()) {
        firmwareConfig.mkdirs();/*w ww  .  j a v a  2s .com*/
    }

    FileSystem fileSystem = null;

    // Copy firmware config files.
    try {
        final String dir = "/resources/firmware_config/";

        URI location = FirmwareUtils.class.getResource(dir).toURI();

        Path myPath;
        if (location.getScheme().equals("jar")) {
            try {
                // In case the filesystem already exists.
                fileSystem = FileSystems.getFileSystem(location);
            } catch (FileSystemNotFoundException e) {
                // Otherwise create the new filesystem.
                fileSystem = FileSystems.newFileSystem(location, Collections.<String, String>emptyMap());
            }

            myPath = fileSystem.getPath(dir);
        } else {
            myPath = Paths.get(location);
        }

        Stream<Path> files = Files.walk(myPath, 1);
        for (Path path : (Iterable<Path>) () -> files.iterator()) {
            System.out.println(path);
            final String name = path.getFileName().toString();
            File fwConfig = new File(firmwareConfig, name);
            if (name.endsWith(".json")) {
                boolean copyFile = !fwConfig.exists();
                ControllerSettings jarSetting = getSettingsForStream(Files.newInputStream(path));

                // If the file is outdated... ask the user (once).
                if (fwConfig.exists()) {
                    ControllerSettings current = getSettingsForStream(new FileInputStream(fwConfig));
                    boolean outOfDate = current.getVersion() < jarSetting.getVersion();
                    if (outOfDate && !userNotified && !overwriteOldFiles) {
                        int result = NarrowOptionPane.showNarrowConfirmDialog(200,
                                Localization.getString("settings.file.outOfDate.message"),
                                Localization.getString("settings.file.outOfDate.title"),
                                JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
                        overwriteOldFiles = result == JOptionPane.OK_OPTION;
                        userNotified = true;
                    }

                    if (overwriteOldFiles) {
                        copyFile = true;
                        jarSetting.getProcessorConfigs().Custom = current.getProcessorConfigs().Custom;
                    }
                }

                // Copy file from jar to firmware_config directory.
                if (copyFile) {
                    try {
                        save(fwConfig, jarSetting);
                    } catch (IOException ex) {
                        logger.log(Level.SEVERE, null, ex);
                    }
                }
            }
        }
    } catch (Exception ex) {
        String errorMessage = String.format("%s %s", Localization.getString("settings.file.generalError"),
                ex.getLocalizedMessage());
        GUIHelpers.displayErrorDialog(errorMessage);
        logger.log(Level.SEVERE, errorMessage, ex);
    } finally {
        if (fileSystem != null) {
            try {
                fileSystem.close();
            } catch (IOException ex) {
                logger.log(Level.SEVERE, "Problem closing filesystem.", ex);
            }
        }
    }

    configFiles.clear();
    for (File f : firmwareConfig.listFiles()) {
        try {
            ControllerSettings config = new Gson().fromJson(new FileReader(f), ControllerSettings.class);
            // ConfigLoader config = new ConfigLoader(f);
            configFiles.put(config.getName(), new ConfigTuple(config, f));
        } catch (FileNotFoundException | JsonSyntaxException | JsonIOException ex) {
            GUIHelpers.displayErrorDialog("Unable to load configuration files: " + f.getAbsolutePath());
        }
    }
}

From source file:net.sf.jabref.gui.desktop.JabRefDesktop.java

public static boolean openExternalFileUnknown(JabRefFrame frame, BibEntry entry,
        BibDatabaseContext databaseContext, String link, UnknownExternalFileType fileType) throws IOException {

    String cancelMessage = Localization.lang("Unable to open file.");
    String[] options = new String[] { Localization.lang("Define '%0'", fileType.getName()),
            Localization.lang("Change file type"), Localization.lang("Cancel") };
    String defOption = options[0];
    int answer = JOptionPane.showOptionDialog(frame,
            Localization.lang(//from   w  w w.  j av  a  2  s. c om
                    "This external link is of the type '%0', which is undefined. What do you want to do?",
                    fileType.getName()),
            Localization.lang("Undefined file type"), JOptionPane.YES_NO_CANCEL_OPTION,
            JOptionPane.QUESTION_MESSAGE, null, options, defOption);
    if (answer == JOptionPane.CANCEL_OPTION) {
        frame.output(cancelMessage);
        return false;
    } else if (answer == JOptionPane.YES_OPTION) {
        // User wants to define the new file type. Show the dialog:
        ExternalFileType newType = new ExternalFileType(fileType.getName(), "", "", "", "new",
                IconTheme.JabRefIcon.FILE.getSmallIcon());
        ExternalFileTypeEntryEditor editor = new ExternalFileTypeEntryEditor(frame, newType);
        editor.setVisible(true);
        if (editor.okPressed()) {
            // Get the old list of types, add this one, and update the list in prefs:
            List<ExternalFileType> fileTypes = new ArrayList<>(
                    ExternalFileTypes.getInstance().getExternalFileTypeSelection());
            fileTypes.add(newType);
            Collections.sort(fileTypes);
            ExternalFileTypes.getInstance().setExternalFileTypes(fileTypes);
            // Finally, open the file:
            return openExternalFileAnyFormat(databaseContext, link, Optional.of(newType));
        } else {
            // Canceled:
            frame.output(cancelMessage);
            return false;
        }
    } else {
        // User wants to change the type of this link.
        // First get a model of all file links for this entry:
        FileListTableModel tModel = new FileListTableModel();
        Optional<String> oldValue = entry.getFieldOptional(FieldName.FILE);
        oldValue.ifPresent(tModel::setContent);
        FileListEntry flEntry = null;
        // Then find which one we are looking at:
        for (int i = 0; i < tModel.getRowCount(); i++) {
            FileListEntry iEntry = tModel.getEntry(i);
            if (iEntry.link.equals(link)) {
                flEntry = iEntry;
                break;
            }
        }
        if (flEntry == null) {
            // This shouldn't happen, so I'm not sure what to put in here:
            throw new RuntimeException("Could not find the file list entry " + link + " in " + entry);
        }

        FileListEntryEditor editor = new FileListEntryEditor(frame, flEntry, false, true, databaseContext);
        editor.setVisible(true, false);
        if (editor.okPressed()) {
            // Store the changes and add an undo edit:
            String newValue = tModel.getStringRepresentation();
            UndoableFieldChange ce = new UndoableFieldChange(entry, FieldName.FILE, oldValue.orElse(null),
                    newValue);
            entry.setField(FieldName.FILE, newValue);
            frame.getCurrentBasePanel().getUndoManager().addEdit(ce);
            frame.getCurrentBasePanel().markBaseChanged();
            // Finally, open the link:
            return openExternalFileAnyFormat(databaseContext, flEntry.link, flEntry.type);
        } else {
            // Canceled:
            frame.output(cancelMessage);
            return false;
        }
    }
}