From 86e7dd8208a50f3154f5bb7d02787367098165e3 Mon Sep 17 00:00:00 2001 From: tjc <tjc@ee4ac58c-ac51-4696-9907-e4b3aa274f04> Date: Thu, 10 Mar 2011 12:33:40 +0000 Subject: [PATCH] add constructor and make border git-svn-id: svn+ssh://svn.internal.sanger.ac.uk/repos/svn/pathsoft/artemis/trunk@15699 ee4ac58c-ac51-4696-9907-e4b3aa274f04 --- .../components/alignment/AbstractGraphPanel.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/uk/ac/sanger/artemis/components/alignment/AbstractGraphPanel.java b/uk/ac/sanger/artemis/components/alignment/AbstractGraphPanel.java index 50e1dc6ad..9afeb40a1 100644 --- a/uk/ac/sanger/artemis/components/alignment/AbstractGraphPanel.java +++ b/uk/ac/sanger/artemis/components/alignment/AbstractGraphPanel.java @@ -34,6 +34,7 @@ import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.text.DecimalFormat; +import javax.swing.BorderFactory; import javax.swing.JCheckBox; import javax.swing.JComponent; import javax.swing.JLabel; @@ -57,7 +58,14 @@ public class AbstractGraphPanel extends JPanel protected int userWinSize = 1; protected JPopupMenu popup = new JPopupMenu(); - public void initPopupMenu(final JPanel graphPanel, JComponent menu) + public AbstractGraphPanel() + { + super(); + setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.gray)); + setBackground(Color.white); + } + + protected void initPopupMenu(JComponent menu) { final JMenuItem setScale = new JMenuItem("Set the Window Size..."); setScale.addActionListener(new ActionListener() @@ -103,7 +111,7 @@ public class AbstractGraphPanel extends JPanel { return; } - graphPanel.repaint(); + bamView.repaint(); } }); menu.add(setScale); -- GitLab