Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8063/src/net/sourceforge/bprocessor/gui
Modified Files:
GUI.java
Log Message:
added thread to periodicly check which spaces are closed and which are open. We might want a nice way to output this.
Index: GUI.java
===================================================================
RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/GUI.java,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** GUI.java 26 Jun 2006 11:37:53 -0000 1.34
--- GUI.java 24 Jul 2006 11:17:43 -0000 1.35
***************
*** 28,31 ****
--- 28,34 ----
import net.sourceforge.bprocessor.gui.treeview.SurfaceTreeView;
import net.sourceforge.bprocessor.model.Project;
+ import net.sourceforge.bprocessor.model.Space;
+
+ import java.util.Iterator;
import java.awt.BorderLayout;
***************
*** 88,91 ****
--- 91,96 ----
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
instance = this;
+ Thread sc = new SpaceChecker();
+ sc.start();
}
***************
*** 418,420 ****
--- 423,460 ----
Project.getInstance().checkpoint();
}
+
+ /**
+ * Checks if spaces are closed.
+ */
+ private class SpaceChecker extends Thread {
+ /**
+ * The constructor
+ */
+ SpaceChecker() {
+ super();
+ }
+
+ /**
+ * The run
+ */
+ public void run() {
+ while (true) {
+ log.info("============check starting===========");
+ Iterator it = Project.getInstance().getSpaces().iterator();
+ while (it.hasNext()) {
+ Space sp = (Space)it.next();
+ if (sp.isClosed()) {
+ log.info("Space " + sp + " is closed");
+ } else {
+ log.info("Space " + sp + " is open");
+ }
+ }
+ try {
+ sleep(10000);
+ } catch (Exception e) {
+ log.info("Space checker thread threw a: " + e);
+ }
+ }
+ }
+ }
}
|