From 0dc6928524ecd106f56bafb9bb00e4b4ef4b41f5 Mon Sep 17 00:00:00 2001 From: jprocter Date: Wed, 12 Nov 2008 17:00:21 +0000 Subject: [PATCH] new constructors for setting IDs --- src/jalview/gui/AppJmol.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/jalview/gui/AppJmol.java b/src/jalview/gui/AppJmol.java index 3a87f8c..32fc85f 100644 --- a/src/jalview/gui/AppJmol.java +++ b/src/jalview/gui/AppJmol.java @@ -74,6 +74,11 @@ public class AppJmol extends GStructureViewer implements StructureListener, public AppJmol(String file, String id, SequenceI[] seq, AlignmentPanel ap, String loadStatus, Rectangle bounds) { + this(file, id, seq, ap, loadStatus, bounds, null); + } + public AppJmol(String file, String id, SequenceI[] seq, + AlignmentPanel ap, String loadStatus, Rectangle bounds, String viewid) + { loadingFromArchive = true; pdbentry = new PDBEntry(); pdbentry.setFile(file); @@ -84,7 +89,7 @@ public class AppJmol extends GStructureViewer implements StructureListener, this.setBounds(bounds); colourBySequence = false; seqColour.setSelected(false); - + viewId = viewid; // jalview.gui.Desktop.addInternalFrame(this, "Loading File", // bounds.width,bounds.height); @@ -968,5 +973,14 @@ public class AppJmol extends GStructureViewer implements StructureListener, } } } + String viewId=null; + public String getViewId() + { + if (viewId==null) + { + viewId=System.currentTimeMillis()+"."+this.hashCode(); + } + return viewId; + } } -- 1.7.10.2