Math2mat

/home/ythoma/docs/math2mat/svn/wp1/framework/m2mGUI/src/m2m/backend/processing/ProcessWatcher.java

Go to the documentation of this file.
00001 
00019 package m2m.backend.processing;
00020 
00021 import java.util.ArrayList;
00022 
00027 public class ProcessWatcher {
00028 
00029 
00030         private static ProcessWatcher instance=null;
00031         
00032         public static ProcessWatcher getInstance() {
00033                 if (instance==null)
00034                         instance = new ProcessWatcher();
00035                 return instance;
00036         }
00037         
00038         public ArrayList<Process> processes;
00039         
00040         private ProcessWatcher() {
00041                 processes = new ArrayList<Process>();
00042         }
00043         
00044         public void deleteProcesses() {
00045                 for(int i=0;i<processes.size();i++) {
00046                         processes.get(i).destroy();
00047                 }
00048         }
00049         
00050         public void addProcess(Process process) {
00051                 processes.add(process);
00052         }
00053         
00054         public void removeProcess(Process process) {
00055                 processes.remove(process);
00056         }
00057         
00058 }
 All Classes Namespaces Files Functions Variables Enumerations