import javax.swing.Action;
import javax.swing.ButtonGroup;
import javax.swing.JButton;
+import javax.swing.JFileChooser;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
* Lets the user choose a new temp directory.
*/
private void chooseTempDirectory() {
- /* TODO */
+ JFileChooser fileChooser = new JFileChooser(tempDirectory);
+ fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
+ int returnValue = fileChooser.showDialog(wizard, I18n.getMessage("jsite.preferences.temp-directory.choose.approve"));
+ if (returnValue == JFileChooser.CANCEL_OPTION) {
+ return;
+ }
+ tempDirectory = fileChooser.getSelectedFile().getPath();
+ tempDirectoryTextField.setText(tempDirectory);
}
}
jsite.preferences.temp-directory.default=Default
jsite.preferences.temp-directory.custom=Custom
jsite.preferences.temp-directory.choose=Choose
+jsite.preferences.temp-directory.choose.approve=Choose
jsite.insert.heading=Project insert
jsite.insert.description=Please wait while the project is being inserted.