X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FOverviewCanvas.java;h=ca27a9cfb77322252f0630735638ea289b7a096c;hb=cb597de858c70703321daa67adef5089957e9f55;hp=de16b00424fb269943b39a688c373646bff48277;hpb=710b4dbd18b7ec764ba8c24d173371541f65297d;p=jalview.git diff --git a/src/jalview/gui/OverviewCanvas.java b/src/jalview/gui/OverviewCanvas.java index de16b00..ca27a9c 100644 --- a/src/jalview/gui/OverviewCanvas.java +++ b/src/jalview/gui/OverviewCanvas.java @@ -31,9 +31,9 @@ import java.awt.Dimension; import java.awt.Graphics; import java.awt.image.BufferedImage; -import javax.swing.JComponent; +import javax.swing.JPanel; -public class OverviewCanvas extends JComponent +public class OverviewCanvas extends JPanel { private static final Color TRANS_GREY = new Color(100, 100, 100, 25); @@ -157,11 +157,9 @@ public class OverviewCanvas extends JComponent { mg.translate(0, od.getSequencesHeight()); or.drawGraph(mg, av.getAlignmentConservationAnnotation(), - av.getCharWidth(), od.getGraphHeight(), - od.getColumns(av.getAlignment())); + od.getGraphHeight(), od.getColumns(av.getAlignment())); mg.translate(0, -od.getSequencesHeight()); } - System.gc(); or.removePropertyChangeListener(progressPanel); or = null; @@ -183,7 +181,7 @@ public class OverviewCanvas extends JComponent @Override public void paintComponent(Graphics g) { - // super.paintComponent(g); + //super.paintComponent(g); if (restart) { @@ -208,7 +206,9 @@ public class OverviewCanvas extends JComponent { // if there is annotation, scale the alignment and annotation // separately - if (od.getGraphHeight() > 0) + if (od.getGraphHeight() > 0 + && od.getSequencesHeight() > 0 // BH 2019 + ) { BufferedImage topImage = lastMiniMe.getSubimage(0, 0, od.getWidth(), od.getSequencesHeight());