Tree title
[jalview.git] / src / jalview / gui / VamsasClient.java
index d943374..df6dbdd 100755 (executable)
@@ -1,5 +1,5 @@
 /**
- * 
+ *
  */
 package jalview.gui;
 
@@ -52,14 +52,14 @@ public class VamsasClient extends ArchiveClient {
     }
 
     try
-    { 
+    {
       //REVERSE ORDER
         for (int i = frames.length - 1; i > -1; i--)
         {
             if (frames[i] instanceof AlignFrame)
             {
               AlignFrame af = (AlignFrame) frames[i];
-              af.alignmentChanged();
+              af.alignPanel.alignmentChanged();
             }
         }
     } catch (Exception e) {
@@ -71,7 +71,7 @@ public class VamsasClient extends ArchiveClient {
        /**
         * this will close all windows currently in Jalview.
         *
-        
+
        protected void closeWindows() {
                JInternalFrame[] frames = Desktop.desktop.getAllFrames();
 
@@ -81,16 +81,16 @@ public class VamsasClient extends ArchiveClient {
         }
 
         try
-        {      
+        {
             for (int i = frames.length - 1; i > -1; i--) {
-               frames[i].dispose();    
+               frames[i].dispose();
             }
         } catch (Exception e) {
                Cache.log.error("Whilst closing windows",e);
         }
-               
+
        }
-  
+
        public void get_update(VamsasArchive doc) {
                // Close windows - load update.
                Cache.log.info("Jalview updating from Vamsas Session.");
@@ -100,9 +100,9 @@ public class VamsasClient extends ArchiveClient {
        public void push_update() {
          watchForChange=false;
     try {
-      Thread.sleep(WATCH_SLEEP); 
+      Thread.sleep(WATCH_SLEEP);
     } catch (Exception e) {
-      
+
     };
     ClientDoc cdoc = getUpdateable();
     updateVamsasDocument(cdoc);
@@ -113,11 +113,11 @@ public class VamsasClient extends ArchiveClient {
     if (watcher!=null) {
       Thread wthread = new Thread() {
         public void run() {
-          watcher.run();          
+          watcher.run();
         }
       };
       wthread.start();
-      
+
     }
                // collect all uncached alignments and put them into the vamsas dataset.
                // store them.
@@ -125,12 +125,12 @@ public class VamsasClient extends ArchiveClient {
        }
        public void end_session() {
          //   stop any update/watcher thread.
-    watchForChange=false; // this makes any watch(long) loops return. 
-    // we should also wait arount for this.WATCH_SLEEP to really make sure the watcher thread has stopped. 
+    watchForChange=false; // this makes any watch(long) loops return.
+    // we should also wait arount for this.WATCH_SLEEP to really make sure the watcher thread has stopped.
     try {
-      Thread.sleep(WATCH_SLEEP); 
+      Thread.sleep(WATCH_SLEEP);
     } catch (Exception e) {
-      
+
     };
     Cache.log.info("Jalview disconnecting from the Vamsas Session.");
        }
@@ -153,7 +153,7 @@ public class VamsasClient extends ArchiveClient {
        public void updateVamsasDocument(ClientDoc doc) {
          ensureJvVamsas();
     VamsasDatastore vds = new VamsasDatastore(doc, vobj2jv, jv2vobj, baseProvEntry());
-    // wander through frames 
+    // wander through frames
                JInternalFrame[] frames = Desktop.desktop.getAllFrames();
 
         if (frames == null)
@@ -162,14 +162,14 @@ public class VamsasClient extends ArchiveClient {
         }
 
         try
-        {      
+        {
                //REVERSE ORDER
             for (int i = frames.length - 1; i > -1; i--)
             {
                 if (frames[i] instanceof AlignFrame)
                 {
                        AlignFrame af = (AlignFrame) frames[i];
-                       
+
                        // update alignment and root from frame.
                        vds.storeVAMSAS(af.getViewport(), af.getTitle());
                 }
@@ -211,12 +211,12 @@ public class VamsasClient extends ArchiveClient {
                          }
       }
       running=false;
-      
+
                }
-               
+
        }
   public void disableGui(boolean b) {
-      Desktop.instance.setVamsasUpdate(b);    
+      Desktop.instance.setVamsasUpdate(b);
   }
   public void startWatcher() {
     if (watcher==null)