* Delete the selected scene
* @param selected index of scene to be deleted
*/
protected void deleteScene(int selected) {
if (selected >= 0 && selected < scenes.size()) {
SceneDescription scene = scenes.get(selected);
Object[] options = {
"Cancel",
"Delete Scene \"" + scene.name + "\""
};
int n = JOptionPane.showOptionDialog(null,
"<html>Are you sure you wish to delete the scene \"" + scene.name + "\"?<br>"
+ "All files for the scene, except snapshot images, will be irreversibly deleted!",
"Delete Scene?",
JOptionPane.YES_NO_OPTION,
JOptionPane.WARNING_MESSAGE,
null,
options,
options[0]);
if (n == 1) {
scene.delete();
// remove scene from table
tableModel.removeRow(selected);
scenes.remove(selected);
loadSelectedBtn.setEnabled(false);
deleteSelectedBtn.setEnabled(false);