From e4bc7e3c94320f057b6015ba6262ac84edb6788d Mon Sep 17 00:00:00 2001 From: kiramt Date: Tue, 25 Apr 2017 13:33:37 +0100 Subject: [PATCH] JAL-2388 And corrected OverviewCanvas for applet --- src/jalview/appletgui/OverviewCanvas.java | 18 ++++++++++++++---- src/jalview/gui/OverviewCanvas.java | 2 -- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/jalview/appletgui/OverviewCanvas.java b/src/jalview/appletgui/OverviewCanvas.java index ffba5b9..ede3b94 100644 --- a/src/jalview/appletgui/OverviewCanvas.java +++ b/src/jalview/appletgui/OverviewCanvas.java @@ -29,10 +29,9 @@ import java.awt.Dimension; import java.awt.Frame; import java.awt.Graphics; import java.awt.Image; +import java.awt.Panel; -import javax.swing.JComponent; - -public class OverviewCanvas extends JComponent +public class OverviewCanvas extends Panel { // This is set true if the alignment view changes whilst // the overview is being calculated @@ -103,6 +102,16 @@ public class OverviewCanvas extends JComponent } } + /** + * Draw the overview sequences + * + * @param showSequenceFeatures + * true if sequence features are to be shown + * @param showAnnotation + * true if the annotation is to be shown + * @param transferRenderer + * the renderer to transfer feature colouring from + */ public void draw(boolean showSequenceFeatures, boolean showAnnotation, FeatureRenderer transferRenderer) { @@ -125,7 +134,8 @@ public class OverviewCanvas extends JComponent Graphics mg = miniMe.getGraphics(); - // check for conservation annotation to make sure overview works for DNA too + // checks for conservation annotation to make sure overview works for DNA + // too if (showAnnotation) { mg.translate(0, od.getSequencesHeight()); diff --git a/src/jalview/gui/OverviewCanvas.java b/src/jalview/gui/OverviewCanvas.java index 920547f..8bea818 100644 --- a/src/jalview/gui/OverviewCanvas.java +++ b/src/jalview/gui/OverviewCanvas.java @@ -120,8 +120,6 @@ public class OverviewCanvas extends JComponent } FeatureColourFinder finder = new FeatureColourFinder(fr); - // why do we need to set preferred size again? was set in - // updateOverviewImage setPreferredSize(new Dimension(od.getWidth(), od.getHeight())); OverviewRenderer or = new OverviewRenderer(sr, finder, od); -- 1.7.10.2