From 348fe2d15827689d155df9345e4f10753cab6ac9 Mon Sep 17 00:00:00 2001 From: hansonr Date: Wed, 20 Jun 2018 18:51:07 +0100 Subject: [PATCH] SeqCanvas and OverviewCanvas It's important for us that these extend JPanel, not JComponent. This is because we have slipped in a new subclass, JSComponent, that extends JComponent and is a superclass of all Swing components in SwingJS. --- src/jalview/gui/OverviewCanvas.java | 4 ++-- src/jalview/gui/SeqCanvas.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/jalview/gui/OverviewCanvas.java b/src/jalview/gui/OverviewCanvas.java index cc361a5..ec2c49f 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); diff --git a/src/jalview/gui/SeqCanvas.java b/src/jalview/gui/SeqCanvas.java index 8f315bd..74af104 100755 --- a/src/jalview/gui/SeqCanvas.java +++ b/src/jalview/gui/SeqCanvas.java @@ -46,7 +46,7 @@ import java.beans.PropertyChangeEvent; import java.util.Iterator; import java.util.List; -import javax.swing.JComponent; +import javax.swing.JPanel; /** * The Swing component on which the alignment sequences, and annotations (if @@ -54,7 +54,7 @@ import javax.swing.JComponent; * Wrapped mode, but not the scale above in Unwrapped mode. * */ -public class SeqCanvas extends JComponent implements ViewportListenerI +public class SeqCanvas extends JPanel implements ViewportListenerI { private static final String ZEROS = "0000000000"; -- 1.7.10.2