Added FIXME for overwriting. Fixed warnings.

This commit is contained in:
Kevin Ruland 2012-07-25 20:35:44 +00:00 committed by U-WINDOWS-C28163E\Administrator
parent 207a768ded
commit 4466bc3f8a

View File

@ -3,12 +3,8 @@ package net.sf.openrocket.gui;
import java.awt.Window; import java.awt.Window;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.io.BufferedOutputStream;
import java.io.File; import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
@ -24,7 +20,6 @@ import net.sf.openrocket.document.OpenRocketDocument;
import net.sf.openrocket.gui.util.SwingPreferences; import net.sf.openrocket.gui.util.SwingPreferences;
import net.sf.openrocket.startup.Application; import net.sf.openrocket.startup.Application;
import net.sf.openrocket.util.BugException; import net.sf.openrocket.util.BugException;
import net.sf.openrocket.util.FileUtils;
public class ExportDecalDialog extends JDialog { public class ExportDecalDialog extends JDialog {
@ -66,13 +61,13 @@ public class ExportDecalDialog extends JDialog {
chooser.addActionListener( new ActionListener() { chooser.addActionListener( new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
JFileChooser chooser = (JFileChooser) e.getSource();
String command = e.getActionCommand(); String command = e.getActionCommand();
if ( command.equals(JFileChooser.CANCEL_SELECTION) ) { if ( command.equals(JFileChooser.CANCEL_SELECTION) ) {
ExportDecalDialog.this.dispose(); ExportDecalDialog.this.dispose();
} else if ( command.equals(JFileChooser.APPROVE_SELECTION)) { } else if ( command.equals(JFileChooser.APPROVE_SELECTION)) {
// Here we copy the bits out. // Here we copy the bits out.
// FIXME - confirm overwrite?
String selectedDecal = (String) decalComboBox.getSelectedItem(); String selectedDecal = (String) decalComboBox.getSelectedItem();
File selectedFile = chooser.getSelectedFile(); File selectedFile = chooser.getSelectedFile();