summaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2008-06-12 22:50:37 +0000
committerPaul Buetow <paul@buetow.org>2008-06-12 22:50:37 +0000
commitfa865850c8c377193c9f5764bc966542c34f9ab3 (patch)
treeaf4be7bfbb410e180ced9e0bd214207c5189709c /sources
parent1e5279ef1c03216c1ad78ebabb7a63d09d3c41d1 (diff)
Bugfix: File chooser now uses absolute path to a file.
Diffstat (limited to 'sources')
-rw-r--r--sources/serialize/VSSerialize.java16
-rw-r--r--sources/simulator/VSSimulator.java4
2 files changed, 10 insertions, 10 deletions
diff --git a/sources/serialize/VSSerialize.java b/sources/serialize/VSSerialize.java
index 26d17c7..2c1abd2 100644
--- a/sources/serialize/VSSerialize.java
+++ b/sources/serialize/VSSerialize.java
@@ -199,9 +199,11 @@ public final class VSSerialize {
fileChooser.addChoosableFileFilter(createFileFilter(prefs));
if (fileChooser.showOpenDialog(simulatorFrame) ==
- JFileChooser.APPROVE_OPTION)
- saveSimulator(fileChooser.getSelectedFile().getName(),
- simulator);
+ JFileChooser.APPROVE_OPTION) {
+ String fileName = fileChooser.getSelectedFile().getAbsolutePath();
+ System.out.println("Save " + fileName);
+ saveSimulator(fileName, simulator);
+ }
}
/**
@@ -256,9 +258,11 @@ public final class VSSerialize {
fileChooser.addChoosableFileFilter(createFileFilter(prefs));
if (fileChooser.showOpenDialog(simulatorFrame) ==
- JFileChooser.APPROVE_OPTION)
- return openSimulator(fileChooser.getSelectedFile().getName(),
- simulatorFrame);
+ JFileChooser.APPROVE_OPTION) {
+ String fileName = fileChooser.getSelectedFile().getAbsolutePath();
+ System.out.println("Open " + fileName);
+ return openSimulator(fileName, simulatorFrame);
+ }
return null;
}
diff --git a/sources/simulator/VSSimulator.java b/sources/simulator/VSSimulator.java
index fb34dec..49079a3 100644
--- a/sources/simulator/VSSimulator.java
+++ b/sources/simulator/VSSimulator.java
@@ -335,7 +335,6 @@ public class VSSimulator extends JPanel implements VSSerializable {
if (SwingUtilities.isRightMouseButton(me)) {
ActionListener actionListener = new ActionListener() {
public void actionPerformed(ActionEvent ae) {
- System.out.println("BAZ");
String command = ae.getActionCommand();
if (command.equals(prefs.getString("lang.remove"))) {
removeTaskAtRow(row);
@@ -597,7 +596,6 @@ public class VSSimulator extends JPanel implements VSSerializable {
prefs.getString("lang.logging.clear"));
clearButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
- System.out.println("BAY");
String command = ae.getActionCommand();
if (command.equals(
prefs.getString("lang.logging.clear"))) {
@@ -820,7 +818,6 @@ public class VSSimulator extends JPanel implements VSSerializable {
takeoverButton.addActionListener(new ActionListener() {
private boolean isRed;
public void actionPerformed(ActionEvent ae) {
- System.out.println("BAR");
String textValue = textField.getText();
Long longValue = null;
@@ -876,7 +873,6 @@ public class VSSimulator extends JPanel implements VSSerializable {
for (VSProcess process : processes) {
VSTask task = createTask.createTask(process, time,
localTasks);
- System.out.println(task);
taskManager.addTask(task, VSTaskManager.PROGRAMMED);
if (selectedProcess == null ||