@Override public void approveSelection() { if (approver != null) { File[] selected = getSelectedFiles(); final File sf = getSelectedFile(); if ((selected == null || selected.length == 0) && sf != null) { selected = new File[] { sf }; } boolean approved = approver.approve(selected); if (approved) { super.approveSelection(); } } else { super.approveSelection(); } }
@Override public void approveSelection() { File selectedFile = getSelectedFile(); if (selectedFile.exists() && getDialogType() == JFileChooser.SAVE_DIALOG) { int result = JOptionPane.showConfirmDialog(this, "Do you want to overwrite?", "File already exists", JOptionPane.YES_NO_OPTION); if (result != JOptionPane.YES_OPTION) { cancelSelection(); return; } } super.approveSelection(); } };
@Override public void approveSelection() { File file = this.getSelectedFile(); if (file.exists() && this.getDialogType() == JFileChooser.SAVE_DIALOG) { int replace = JOptionPane.showConfirmDialog( this, file.getName() +" "+ I18n.valueByKey("LIST_EXPORT_CONFIRM_LABEL"), I18n.valueByKey("LIST_EXPORT_CONFIRM_TITLE"), JOptionPane.YES_NO_OPTION ); switch (replace) { case JOptionPane.YES_OPTION: super.approveSelection(); return; case JOptionPane.NO_OPTION: case JOptionPane.CLOSED_OPTION: return; case JOptionPane.CANCEL_OPTION: this.cancelSelection(); return; default: break; } } else { super.approveSelection(); } } };
@Override public void approveSelection() { File file = this.getSelectedFile(); if (this.getDialogType() == SAVE_DIALOG) { if (file.exists()) { int result = JOptionPane.showConfirmDialog( this, this.getSelectedFile().getName() + " " + I18n.valueByKey("SAVE_TAB_CONFIRM_LABEL"), I18n.valueByKey("SAVE_TAB_CONFIRM_TITLE"), JOptionPane.YES_NO_OPTION ); switch (result) { case JOptionPane.YES_OPTION: super.approveSelection(); return; case JOptionPane.NO_OPTION: case JOptionPane.CLOSED_OPTION: return; case JOptionPane.CANCEL_OPTION: this.cancelSelection(); return; default: break; } } else { super.approveSelection(); } } }
@Override public void approveSelection() { if (canExport(this)) { super.approveSelection(); } } };
@Override public void approveSelection() { if (canExport(this)) { super.approveSelection(); } } };
public void actionPerformed(ActionEvent e) { setSelectedFiles(); chooser.approveSelection(); } }
public void approveSelection() { accepted = true; super.approveSelection(); }
@Override public void approveSelection() { super.approveSelection(); cancelled = false; File selected = super.getSelectedFile(); if (selected != null) { selectedFilePath = selected.getAbsolutePath(); } }
@Override public void approveSelection() { returnValue = APPROVE_OPTION; if (dialog != null) { hide(dialog); } super.approveSelection(); }
@Override public void approveSelection() { if (accessory != null && !accessory.canApprove()) { return; } super.approveSelection(); }
@Override public void approveSelection() { if (validator != null) { String msgError = validator.validate(getSelectedFile().getPath()); if (msgError != null) { JOptionPane.showMessageDialog(this, msgError); return; } } super.approveSelection(); } }
@Override public void approveSelection() { File f = getSelectedFile(); if (f.exists()) { String msg = f.getName() + " exists already. Overwrite?"; if (!Dialogs.showYesNoQuestionDialog(this, "Confirmation", msg)) { return; } } super.approveSelection(); } }
@Override public void approveSelection() { File file = getSelectedFile(); if (file != null && !file.exists()) { showFileNotFoundDialog(); return; } super.approveSelection(); }
@Override public void approveSelection() { File file = getSelectedFile(); if (file != null && file.exists() && !askOverwrite(file)) { return; } super.approveSelection(); }
public void approveSelection() { closeParser(); openParser(getSelectedFile()); notifyContentsChanged(); super.approveSelection(); }
public void approveSelection() { File dir = FileUtil.normalizeFile(getSelectedFile()); String mess = Util.rootOfUsableDomain(dir); if (null == mess) { super.approveSelection(); } else { setCurrentDirectory( dir ); } }
public void approveSelection() { File dir = FileUtil.normalizeFile(getSelectedFile()); if ( ServerLocationManager.isGoodAppServerLocation(dir) ) { super.approveSelection(); } else { setCurrentDirectory( dir ); } }
public void approveSelection() { File dir = FileUtil.normalizeFile(getSelectedFile()); if ( dir != null && ImportCDCProjectPanel.isOldProject( FileUtil.toFileObject(dir),ImportCDCProjectPanel.prjType) ) { super.approveSelection(); } else { setCurrentDirectory( dir ); } } }