/**
- *
+ *
*/
package jalview.gui;
}
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) {
/**
* this will close all windows currently in Jalview.
*
-
+
protected void closeWindows() {
JInternalFrame[] frames = Desktop.desktop.getAllFrames();
}
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.");
public void push_update() {
watchForChange=false;
try {
- Thread.sleep(WATCH_SLEEP);
+ Thread.sleep(WATCH_SLEEP);
} catch (Exception e) {
-
+
};
ClientDoc cdoc = getUpdateable();
updateVamsasDocument(cdoc);
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.
}
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.");
}
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)
}
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());
}
}
}
running=false;
-
+
}
-
+
}
public void disableGui(boolean b) {
- Desktop.instance.setVamsasUpdate(b);
+ Desktop.instance.setVamsasUpdate(b);
}
public void startWatcher() {
if (watcher==null)