2 * Jalview - A Sequence Alignment Editor and Viewer
3 * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 package jalview.jbgui;
\r
23 import javax.swing.*;
\r
24 import javax.swing.border.*;
\r
27 public class GAlignmentPanel extends JPanel {
\r
28 protected JPanel sequenceHolderPanel = new JPanel();
\r
29 protected JScrollBar vscroll = new JScrollBar();
\r
30 protected JScrollBar hscroll = new JScrollBar();
\r
31 protected JPanel seqPanelHolder = new JPanel();
\r
32 BorderLayout borderLayout1 = new BorderLayout();
\r
33 BorderLayout borderLayout3 = new BorderLayout();
\r
34 protected JPanel scalePanelHolder = new JPanel();
\r
35 protected JPanel idPanelHolder = new JPanel();
\r
36 BorderLayout borderLayout5 = new BorderLayout();
\r
37 protected JPanel idSpaceFillerPanel1 = new JPanel();
\r
38 public JPanel annotationSpaceFillerHolder = new JPanel();
\r
39 BorderLayout borderLayout6 = new BorderLayout();
\r
40 ButtonGroup buttonGroup1 = new ButtonGroup();
\r
41 BorderLayout borderLayout7 = new BorderLayout();
\r
42 JPanel hscrollHolder = new JPanel();
\r
43 BorderLayout borderLayout10 = new BorderLayout();
\r
44 protected JPanel hscrollFillerPanel = new JPanel();
\r
45 BorderLayout borderLayout11 = new BorderLayout();
\r
46 public JScrollPane annotationScroller = new JScrollPane();
\r
48 BorderLayout borderLayout4 = new BorderLayout();
\r
50 public GAlignmentPanel() {
\r
53 } catch (Exception e) {
\r
54 e.printStackTrace();
\r
58 private void jbInit() throws Exception {
\r
59 border1 = BorderFactory.createLineBorder(Color.gray, 1);
\r
60 idPanelHolder.setBorder(null);
\r
61 idPanelHolder.setPreferredSize(new Dimension(70, 10));
\r
62 this.setLayout(borderLayout7);
\r
63 sequenceHolderPanel.setMaximumSize(new Dimension(2147483647, 2147483647));
\r
64 sequenceHolderPanel.setMinimumSize(new Dimension(150, 150));
\r
65 sequenceHolderPanel.setPreferredSize(new Dimension(150, 150));
\r
66 sequenceHolderPanel.setLayout(borderLayout3);
\r
67 seqPanelHolder.setLayout(borderLayout1);
\r
68 scalePanelHolder.setBackground(Color.white);
\r
69 scalePanelHolder.setMinimumSize(new Dimension(10, 80));
\r
70 scalePanelHolder.setPreferredSize(new Dimension(10, 30));
\r
71 scalePanelHolder.setLayout(borderLayout6);
\r
72 idPanelHolder.setLayout(borderLayout5);
\r
73 idSpaceFillerPanel1.setBackground(Color.white);
\r
74 idSpaceFillerPanel1.setPreferredSize(new Dimension(10, 30));
\r
75 idSpaceFillerPanel1.setLayout(borderLayout11);
\r
76 annotationSpaceFillerHolder.setBackground(Color.white);
\r
77 annotationSpaceFillerHolder.setPreferredSize(new Dimension(10, 80));
\r
78 annotationSpaceFillerHolder.setLayout(borderLayout4);
\r
79 hscroll.setOrientation(JScrollBar.HORIZONTAL);
\r
80 hscrollHolder.setLayout(borderLayout10);
\r
81 hscrollFillerPanel.setBackground(Color.white);
\r
82 hscrollFillerPanel.setPreferredSize(new Dimension(70, 10));
\r
83 hscrollHolder.setBackground(Color.white);
\r
84 annotationScroller.setBorder(null);
\r
85 annotationScroller.setPreferredSize(new Dimension(10, 80));
\r
86 this.setPreferredSize(new Dimension(220, 166));
\r
87 this.setRequestFocusEnabled(true);
\r
88 sequenceHolderPanel.add(scalePanelHolder, BorderLayout.NORTH);
\r
89 sequenceHolderPanel.add(seqPanelHolder, BorderLayout.CENTER);
\r
90 seqPanelHolder.add(vscroll, BorderLayout.EAST);
\r
91 sequenceHolderPanel.add(annotationScroller, BorderLayout.SOUTH);
\r
93 // jPanel3.add(secondaryPanelHolder, BorderLayout.SOUTH);
\r
94 this.add(idPanelHolder, BorderLayout.WEST);
\r
95 idPanelHolder.add(idSpaceFillerPanel1, BorderLayout.NORTH);
\r
96 idPanelHolder.add(annotationSpaceFillerHolder, BorderLayout.SOUTH);
\r
97 this.add(hscrollHolder, BorderLayout.SOUTH);
\r
98 hscrollHolder.add(hscroll, BorderLayout.CENTER);
\r
99 hscrollHolder.add(hscrollFillerPanel, BorderLayout.WEST);
\r
100 this.add(sequenceHolderPanel, BorderLayout.CENTER);
\r