2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
21 package jalview.jbgui;
23 import java.awt.BorderLayout;
24 import java.awt.Color;
25 import java.awt.Dimension;
27 import javax.swing.BorderFactory;
28 import javax.swing.ButtonGroup;
29 import javax.swing.JPanel;
30 import javax.swing.JScrollBar;
31 import javax.swing.JScrollPane;
32 import javax.swing.border.Border;
34 public class GAlignmentPanel extends JPanel
36 protected JScrollBar vscroll = new JScrollBar();
38 protected JScrollBar hscroll = new JScrollBar();
40 BorderLayout borderLayout1 = new BorderLayout();
42 BorderLayout borderLayout3 = new BorderLayout();
44 BorderLayout borderLayout5 = new BorderLayout();
46 BorderLayout borderLayout6 = new BorderLayout();
48 ButtonGroup buttonGroup1 = new ButtonGroup();
50 BorderLayout borderLayout7 = new BorderLayout();
52 BorderLayout borderLayout10 = new BorderLayout();
54 BorderLayout borderLayout11 = new BorderLayout();
56 public JScrollPane annotationScroller = new JScrollPane();
60 BorderLayout borderLayout4 = new BorderLayout();
63 static JPanel newJPanel() { // BH 2019
64 JPanel p = new JPanel();
65 p.setBackground(Color.white);
69 protected JPanel sequenceHolderPanel = newJPanel();
70 protected JPanel seqPanelHolder = newJPanel();
71 protected JPanel scalePanelHolder = newJPanel();
72 protected JPanel idPanelHolder = newJPanel();
73 protected JPanel idSpaceFillerPanel1 = newJPanel();
74 public JPanel annotationSpaceFillerHolder = newJPanel();
75 protected JPanel hscrollFillerPanel = newJPanel();
76 JPanel hscrollHolder = newJPanel();
80 public GAlignmentPanel()
91 private void jbInit() throws Exception
93 annotationScroller.setBackground(Color.white); // BH 2019
95 border1 = BorderFactory.createLineBorder(Color.gray, 1);
96 idPanelHolder.setBorder(null);
97 idPanelHolder.setPreferredSize(new Dimension(70, 10));
98 this.setLayout(borderLayout7);
100 .setMaximumSize(new Dimension(2147483647, 2147483647));
101 sequenceHolderPanel.setMinimumSize(new Dimension(150, 150));
102 sequenceHolderPanel.setPreferredSize(new Dimension(150, 150));
103 sequenceHolderPanel.setLayout(borderLayout3);
104 seqPanelHolder.setLayout(borderLayout1);
105 scalePanelHolder.setBackground(Color.white);
106 scalePanelHolder.setMinimumSize(new Dimension(10, 80));
107 scalePanelHolder.setPreferredSize(new Dimension(10, 30));
108 scalePanelHolder.setLayout(borderLayout6);
109 idPanelHolder.setLayout(borderLayout5);
110 idSpaceFillerPanel1.setBackground(Color.white);
111 idSpaceFillerPanel1.setPreferredSize(new Dimension(10, 30));
112 idSpaceFillerPanel1.setLayout(borderLayout11);
113 annotationSpaceFillerHolder.setBackground(Color.white);
114 annotationSpaceFillerHolder.setPreferredSize(new Dimension(10, 80));
115 annotationSpaceFillerHolder.setLayout(borderLayout4);
116 hscroll.setOrientation(JScrollBar.HORIZONTAL);
117 hscrollHolder.setLayout(borderLayout10);
118 hscrollFillerPanel.setBackground(Color.white);
119 hscrollFillerPanel.setPreferredSize(new Dimension(70, 10));
120 hscrollHolder.setBackground(Color.white);
121 annotationScroller.setBorder(null);
122 annotationScroller.setPreferredSize(new Dimension(10, 80));
123 this.setPreferredSize(new Dimension(220, 166));
125 sequenceHolderPanel.add(scalePanelHolder, BorderLayout.NORTH);
126 sequenceHolderPanel.add(seqPanelHolder, BorderLayout.CENTER);
127 seqPanelHolder.add(vscroll, BorderLayout.EAST);
128 sequenceHolderPanel.add(annotationScroller, BorderLayout.SOUTH);
130 // jPanel3.add(secondaryPanelHolder, BorderLayout.SOUTH);
131 this.add(idPanelHolder, BorderLayout.WEST);
132 idPanelHolder.add(idSpaceFillerPanel1, BorderLayout.NORTH);
133 idPanelHolder.add(annotationSpaceFillerHolder, BorderLayout.SOUTH);
134 this.add(hscrollHolder, BorderLayout.SOUTH);
135 hscrollHolder.add(hscroll, BorderLayout.CENTER);
136 hscrollHolder.add(hscrollFillerPanel, BorderLayout.WEST);
137 this.add(sequenceHolderPanel, BorderLayout.CENTER);