extends JDialog
implements Runnable, ActionListener
{
- JFrame frame;
- Thread thread;
- AltosReader reader;
- AltosCSV writer;
+ JFrame frame;
+ Thread thread;
+ AltosRecordIterable iterable;
+ AltosCSV writer;
public void run() {
AltosLogfileChooser chooser;
chooser = new AltosLogfileChooser(frame);
- reader = chooser.runDialog();
- if (reader == null)
+ iterable = chooser.runDialog();
+ if (iterable == null)
return;
JFileChooser csv_chooser;
path = path.substring(0,dot);
path = path.concat(".csv");
csv_chooser = new JFileChooser(path);
+ csv_chooser.setSelectedFile(new File(path));
int ret = csv_chooser.showSaveDialog(frame);
if (ret == JFileChooser.APPROVE_OPTION) {
try {
"Cannot open file",
JOptionPane.ERROR_MESSAGE);
}
- writer.write(reader);
- reader.close();
+ writer.write(iterable);
writer.close();
}
}