import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Hashtable;
+import java.util.IdentityHashMap;
import java.util.Vector;
import java.util.jar.JarOutputStream;
Cache.log.info("Jalview loading the Vamsas Session.");
// load in the vamsas archive for the first time
ClientDoc cdoc = this.getUpdateable();
+ updateJalview(cdoc);
+
+ }
+ /**
+ * this will close all windows currently in Jalview.
+ *
+ */
+ protected void closeWindows() {
+ JInternalFrame[] frames = Desktop.desktop.getAllFrames();
+
+ if (frames == null)
+ {
+ return;
+ }
+
+ try
+ {
+ for (int i = frames.length - 1; i > -1; i--) {
+ 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() {
// stop any update/watcher thread.
Cache.log.info("Jalview disconnecting from the Vamsas Session.");
}
- java.util.Hashtable jv2vobj = null;
+ public void updateJalview(ClientDoc cdoc) {
+
+ }
+ protected void _updateAlignFrame(ClientDoc cdoc, AlignFrame av) {
+
+ }
+ /**
+ * jalview object binding to VorbaIds
+ */
+ IdentityHashMap jv2vobj = null;
+ Hashtable vobj2jv = null;
public void updateVamsasDocument(ClientDoc doc) {
- if (jv2vobj==null)
- jv2vobj = new Hashtable();
+ if (jv2vobj==null) {
+ jv2vobj = new IdentityHashMap();
+ vobj2jv = new Hashtable();
+ }
// wander through frames
JInternalFrame[] frames = Desktop.desktop.getAllFrames();
if (frames[i] instanceof AlignFrame)
{
AlignFrame af = (AlignFrame) frames[i];
+
// check if this frame has an associated alignment object ?
+
// update alignment and root from frame.
}