From 5eb35a6da1ba939878c0351f35b4019fd406ffdd Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 19 May 2008 09:34:17 +0000 Subject: TaskManager bugfix. --- sources/simulator/VSSimulationPanel.java | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'sources/simulator/VSSimulationPanel.java') 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 getProcessesArray() { - ArrayList arr = new ArrayList(); + public ArrayList getProcessesArray() { + ArrayList arr = new ArrayList(); - for (VSProcess process : processes) - arr.add(process); + for (VSProcess process : processes) + arr.add(process); - return arr; - } + return arr; + } } -- cgit v1.2.3