X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fappletgui%2FPaintRefresher.java;h=4e1bfaf2c86649ade08baeeefc98fac3194c6635;hb=2b2e4f5da97889b83c6f8b0fbe41f163feca7e82;hp=889a7dbf1c45d50115c52f5ab0c2b191c866e3ff;hpb=79c8ec26a6dd87b23e94abd7cf9c5de8c139e721;p=jalview.git
diff --git a/src/jalview/appletgui/PaintRefresher.java b/src/jalview/appletgui/PaintRefresher.java
index 889a7db..4e1bfaf 100755
--- a/src/jalview/appletgui/PaintRefresher.java
+++ b/src/jalview/appletgui/PaintRefresher.java
@@ -1,23 +1,24 @@
/*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6)
- * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
- *
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
+ * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle
+ *
* This file is part of Jalview.
- *
+ *
* Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
+ * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
- *
- * Jalview is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ *
+ * Jalview is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License along with Jalview. If not, see .
*/
package jalview.appletgui;
import java.util.*;
+import java.util.List;
import java.awt.*;
@@ -25,7 +26,7 @@ import jalview.datamodel.*;
/**
* DOCUMENT ME!
- *
+ *
* @author $author$
* @version $Revision$
*/
@@ -35,7 +36,7 @@ public class PaintRefresher
/**
* DOCUMENT ME!
- *
+ *
* @param comp
* DOCUMENT ME!
* @param al
@@ -122,8 +123,8 @@ public class PaintRefresher
else if (validateSequences && comp instanceof AlignmentPanel
&& source instanceof AlignmentPanel)
{
- validateSequences(((AlignmentPanel) source).av.alignment,
- ((AlignmentPanel) comp).av.alignment);
+ validateSequences(((AlignmentPanel) source).av.getAlignment(),
+ ((AlignmentPanel) comp).av.getAlignment());
}
if (comp instanceof AlignmentPanel && alignmentChanged)
@@ -183,7 +184,11 @@ public class PaintRefresher
{
if (i < comp.getHeight())
{
- comp.getSequences().insertElementAt(a1[i], i);
+ // TODO: the following does not trigger any recalculation of height/etc, or maintain the dataset
+ List alsq;
+ synchronized (alsq=comp.getSequences()) {
+ alsq.add(i, a1[i]);
+ }
}
else
{
@@ -235,7 +240,7 @@ public class PaintRefresher
{
if (comps.elementAt(i) instanceof AlignmentPanel)
{
- tmp.addElement(((AlignmentPanel) comps.elementAt(i)));
+ tmp.addElement(comps.elementAt(i));
}
}
AlignmentPanel[] result = new AlignmentPanel[tmp.size()];