\r
public void closeMenuItem_actionPerformed()\r
{\r
- PaintRefresher.components.remove(viewport.alignment);\r
+ PaintRefresher.RemoveComponent(alignPanel);\r
+ PaintRefresher.RemoveComponent(alignPanel.seqPanel.seqCanvas);\r
+ PaintRefresher.RemoveComponent(alignPanel.idPanel.idCanvas);\r
+\r
if(PaintRefresher.components.size()==0 && viewport.applet==null)\r
System.exit(0);\r
\r
else\r
newal = new Alignment(viewport.alignment.getSequencesArray());\r
\r
-\r
-\r
AlignFrame newaf = new AlignFrame(newal,\r
viewport.applet,\r
- this.getTitle()+" (New View)",\r
+ "",\r
false);\r
\r
newaf.viewport.sequenceSetID = alignPanel.av.getSequenceSetId();\r
PaintRefresher.Register(newaf.alignPanel.seqPanel.seqCanvas,\r
newaf.alignPanel.av.getSequenceSetId());\r
\r
+ Vector comps = (Vector)PaintRefresher.components.get(viewport.getSequenceSetId());\r
+ int viewSize = -1;\r
+ for (int i = 0; i < comps.size(); i++)\r
+ {\r
+ if (comps.elementAt(i) instanceof AlignmentPanel)\r
+ viewSize++;\r
+ }\r
+\r
+ StringBuffer title = new StringBuffer(this.getTitle());\r
+ if (title.indexOf("(View") > -1)\r
+ title.setLength(title.indexOf("(View"));\r
+\r
+ title.append("(View ");\r
+ title.append(viewSize);\r
+ title.append(")");\r
+\r
+ newaf.setTitle(title.toString());\r
+\r
+\r
newaf.viewport.historyList = viewport.historyList;\r
newaf.viewport.redoList = viewport.redoList;\r
\r