import java.beans.PropertyChangeEvent;
import java.util.List;
+@SuppressWarnings("serial")
public class AlignmentPanel extends Panel
implements AdjustmentListener, AlignmentViewPanel, ViewportListenerI
{
public boolean scrollTo(int ostart, int end, int seqIndex,
boolean scrollToNearest, boolean redrawOverview)
{
- int startv, endv, starts, ends, width;
+ int startv, endv, starts, ends;// , width;
int start = -1;
if (av.hasHiddenColumns())
@Override
public void adjustmentValueChanged(AdjustmentEvent evt)
{
+ seqPanel.seqCanvas.clearFastPaint();
// Note that this event is NOT fired by the AWT scrollbar when setValues is
// called. Instead manually call adjustHorizontal and adjustVertical
// directly.
import java.beans.PropertyChangeEvent;
import java.util.Iterator;
+@SuppressWarnings("serial")
public class SeqCanvas extends Panel implements ViewportListenerI
{
FeatureRenderer fr;
}
}
+ /**
+ * Ensure that a full paint is done next, for whatever reason. This was
+ * necessary for JavaScript; apparently in Java the timing is just right on
+ * multiple threads (EventQueue-0, Consensus, Conservation) that we can get
+ * away with one fast paint before the others, but this ensures that in the
+ * end we get a full paint. Problem arose in relation to copy/paste, where the
+ * paste was not finalized with a full paint.
+ *
+ * @author hansonr 2019.04.17
+ */
+ public void clearFastPaint()
+ {
+ fastPaint = false;
+ }
+
}
* @author $author$
* @version $Revision: 1.161 $
*/
+@SuppressWarnings("serial")
public class AlignmentPanel extends GAlignmentPanel implements
AdjustmentListener, Printable, AlignmentViewPanel, ViewportListenerI
{
}
ranges.setViewportStartAndHeight(y, height);
}
+ seqPanel.seqCanvas.clearFastPaint();
repaint();
}
{
return calculationDialog;
}
+
}
* Wrapped mode, but not the scale above in Unwrapped mode.
*
*/
+@SuppressWarnings("serial")
public class SeqCanvas extends JPanel implements ViewportListenerI
{
/*
}
fastpainting = true;
fastPaint = true;
-
try
{
int charHeight = av.getCharHeight();
width -= (width % charWidth);
height -= (height % charHeight);
-
if ((img != null) && (fastPaint
|| (getVisibleRect().width != g.getClipBounds().width)
|| (getVisibleRect().height != g.getClipBounds().height)))
fastPaint = true;
fastpainting = true;
+ System.out
+ .println("fastpaintwrapped fastpainting true; fastPaint="
+ + fastPaint);
try
{
{
return labelWidthWest;
}
+
+ /**
+ * Ensure that a full paint is done next, for whatever reason. This was
+ * necessary for JavaScript; apparently in Java the timing is just right on
+ * multiple threads (EventQueue-0, Consensus, Conservation) that we can get
+ * away with one fast paint before the others, but this ensures that in the
+ * end we get a full paint. Problem arose in relation to copy/paste, where the
+ * paste was not finalized with a full paint.
+ *
+ * @author hansonr 2019.04.17
+ */
+ public void clearFastPaint()
+ {
+ fastPaint = false;
+ }
}