}
if (vote == Vote.APPROVE) {
updatingSelection = true;
FileBrowserSheet fileBrowserSheet = (FileBrowserSheet)sheet;
FileBrowserSheet.Mode mode = fileBrowserSheet.getMode();
switch (mode) {
case OPEN:
case OPEN_MULTIPLE:
case SAVE_TO: {
fileBrowserSheet.setSelectedFiles(fileBrowser.getSelectedFiles());
break;
}
case SAVE_AS: {
String fileName = saveAsTextInput.getText();
File selectedFile = new File(fileBrowser.getRootDirectory(), fileName);
fileBrowserSheet.setSelectedFiles(new ArrayList<File>(selectedFile));
break;
}
}
updatingSelection = false;