JAL-3446 reorganized JalviewJSApp (accidentally put that in jalview/api)
[jalview.git] / src / jalview / gui / AlignFrame.java
index 4e50439..f74eb32 100644 (file)
@@ -167,6 +167,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
         IProgressIndicator, AlignViewControllerGuiI, ColourChangeListener
 {
 
+  public static int frameCount;
+  
   public static final int DEFAULT_WIDTH = 700;
 
   public static final int DEFAULT_HEIGHT = 500;
@@ -194,6 +196,8 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
 
   File fileObject;
 
+  private int id;
+
   /**
    * Creates a new AlignFrame object with specific width and height.
    * 
@@ -288,6 +292,9 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
   public AlignFrame(AlignmentI al, HiddenColumns hiddenColumns, int width,
           int height, String sequenceSetId, String viewId)
   {
+    
+    id = (++frameCount);
+    
     setSize(width, height);
 
     if (al.getDataset() == null)
@@ -5923,6 +5930,12 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
     alignPanel.getSeqPanel().selection(sel, csel, hidden, null);
   }
 
+  
+  public int getID()
+  {
+    return id;
+  }
+
 }
 
 class PrintThread extends Thread