diff options
| author | Paul Buetow <paul@buetow.org> | 2008-05-19 09:34:17 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2008-05-19 09:34:17 +0000 |
| commit | 5eb35a6da1ba939878c0351f35b4019fd406ffdd (patch) | |
| tree | d74636167291a21b5694eee3fd5f5564d1075424 /sources/simulator/VSSimulationPanel.java | |
| parent | 6dec65db5dceaf8636a98f5bd51c31e20922ecdd (diff) | |
TaskManager bugfix.
Diffstat (limited to 'sources/simulator/VSSimulationPanel.java')
| -rw-r--r-- | sources/simulator/VSSimulationPanel.java | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/sources/simulator/VSSimulationPanel.java b/sources/simulator/VSSimulationPanel.java index 49c7bbf..179542c 100644 --- a/sources/simulator/VSSimulationPanel.java +++ b/sources/simulator/VSSimulationPanel.java @@ -448,8 +448,8 @@ public class VSSimulationPanel extends JPanel implements Runnable, MouseMotionLi } public VSProcess getProcess(int processNum) { - if (processNum >= processes.size()) - return null; + if (processNum >= processes.size()) + return null; return processes.get(processNum); } @@ -496,7 +496,6 @@ public class VSSimulationPanel extends JPanel implements Runnable, MouseMotionLi while (!isFinalized && (isPaused || isFinished || isResetted)) { try { Thread.sleep(100); - repaint(); } catch (Exception e) { System.out.println(e); } @@ -562,7 +561,7 @@ public class VSSimulationPanel extends JPanel implements Runnable, MouseMotionLi for (VSProcess p : processes) p.reset(); - /* Reset the task manager AFTER the processes, for the programmed tasks */ + /* Reset the task manager AFTER the processes, for the programmed tasks */ taskManager.reset(); synchronized (messageLines) { @@ -740,12 +739,12 @@ public class VSSimulationPanel extends JPanel implements Runnable, MouseMotionLi recalcOnWindowChanged(); } - public ArrayList<VSProcess> getProcessesArray() { - ArrayList<VSProcess> arr = new ArrayList<VSProcess>(); + public ArrayList<VSProcess> getProcessesArray() { + ArrayList<VSProcess> arr = new ArrayList<VSProcess>(); - for (VSProcess process : processes) - arr.add(process); + for (VSProcess process : processes) + arr.add(process); - return arr; - } + return arr; + } } |
