@@ -0,0 +1,1201 @@
+package gvs.business.logic;%0A%0A/**%0A * In order to layout graphs in their own threads, it must be ensured that no%0A * other data is sent to the layout modul. For this reason the monitor locks the%0A * visualization modul until layouting%0A * %0A * @author aegli%0A *%0A */%0Apublic class LayoutMonitor %7B%0A%0A  private boolean locked = false;%0A  private static LayoutMonitor myMonitor = null;%0A%0A  private LayoutMonitor() %7B%0A  %7D%0A%0A  /**%0A   * Returns an instance of the looking monitor%0A   */%0A  public static synchronized LayoutMonitor getInstance() %7B%0A    if (getMyMonitor() == null) %7B%0A      setMyMonitor(new LayoutMonitor());%0A    %7D%0A    return getMyMonitor();%0A  %7D%0A%0A  /**%0A   * Locks monitor, so other threads have to wait until former thread releases%0A   * lock%0A   */%0A  public synchronized void lock() throws InterruptedException %7B%0A    while (locked) %7B%0A      wait();%0A    %7D%0A    locked = true;%0A  %7D%0A%0A  /**%0A   * Releases lock, so other threads can request lock%0A   *%0A   */%0A  public synchronized void unlock() %7B%0A    locked = false;%0A    notifyAll();%0A  %7D%0A%0A  public static LayoutMonitor getMyMonitor() %7B%0A    return myMonitor;%0A  %7D%0A%0A  public static void setMyMonitor(LayoutMonitor myMonitor) %7B%0A    LayoutMonitor.myMonitor = myMonitor;%0A  %7D%0A%7D%0A

rename layout monitor