From: hansonr Date: Wed, 20 Jun 2018 17:51:07 +0000 (+0100) Subject: SeqCanvas and OverviewCanvas X-Git-Tag: Release_2_11_4_0~45^2~18^2~677 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=348fe2d15827689d155df9345e4f10753cab6ac9;p=jalview.git 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. --- 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";