JAL-1620 version bump and release notes
[jalview.git] / src / jalview / jbgui / GAlignmentPanel.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2b1)
3  * Copyright (C) 2014 The Jalview Authors
4  * 
5  * This file is part of Jalview.
6  * 
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.
11  *  
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.
16  * 
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.
20  */
21 package jalview.jbgui;
22
23 import java.awt.*;
24 import javax.swing.*;
25 import javax.swing.border.*;
26
27 public class GAlignmentPanel extends JPanel
28 {
29   protected JPanel sequenceHolderPanel = new JPanel();
30
31   protected JScrollBar vscroll = new JScrollBar();
32
33   protected JScrollBar hscroll = new JScrollBar();
34
35   protected JPanel seqPanelHolder = new JPanel();
36
37   BorderLayout borderLayout1 = new BorderLayout();
38
39   BorderLayout borderLayout3 = new BorderLayout();
40
41   protected JPanel scalePanelHolder = new JPanel();
42
43   protected JPanel idPanelHolder = new JPanel();
44
45   BorderLayout borderLayout5 = new BorderLayout();
46
47   protected JPanel idSpaceFillerPanel1 = new JPanel();
48
49   public JPanel annotationSpaceFillerHolder = new JPanel();
50
51   BorderLayout borderLayout6 = new BorderLayout();
52
53   ButtonGroup buttonGroup1 = new ButtonGroup();
54
55   BorderLayout borderLayout7 = new BorderLayout();
56
57   JPanel hscrollHolder = new JPanel();
58
59   BorderLayout borderLayout10 = new BorderLayout();
60
61   protected JPanel hscrollFillerPanel = new JPanel();
62
63   BorderLayout borderLayout11 = new BorderLayout();
64
65   public JScrollPane annotationScroller = new JScrollPane();
66
67   Border border1;
68
69   BorderLayout borderLayout4 = new BorderLayout();
70
71   public GAlignmentPanel()
72   {
73     try
74     {
75       jbInit();
76     } catch (Exception e)
77     {
78       e.printStackTrace();
79     }
80   }
81
82   private void jbInit() throws Exception
83   {
84     border1 = BorderFactory.createLineBorder(Color.gray, 1);
85     idPanelHolder.setBorder(null);
86     idPanelHolder.setPreferredSize(new Dimension(70, 10));
87     this.setLayout(borderLayout7);
88     sequenceHolderPanel
89             .setMaximumSize(new Dimension(2147483647, 2147483647));
90     sequenceHolderPanel.setMinimumSize(new Dimension(150, 150));
91     sequenceHolderPanel.setPreferredSize(new Dimension(150, 150));
92     sequenceHolderPanel.setLayout(borderLayout3);
93     seqPanelHolder.setLayout(borderLayout1);
94     scalePanelHolder.setBackground(Color.white);
95     scalePanelHolder.setMinimumSize(new Dimension(10, 80));
96     scalePanelHolder.setPreferredSize(new Dimension(10, 30));
97     scalePanelHolder.setLayout(borderLayout6);
98     idPanelHolder.setLayout(borderLayout5);
99     idSpaceFillerPanel1.setBackground(Color.white);
100     idSpaceFillerPanel1.setPreferredSize(new Dimension(10, 30));
101     idSpaceFillerPanel1.setLayout(borderLayout11);
102     annotationSpaceFillerHolder.setBackground(Color.white);
103     annotationSpaceFillerHolder.setPreferredSize(new Dimension(10, 80));
104     annotationSpaceFillerHolder.setLayout(borderLayout4);
105     hscroll.setOrientation(JScrollBar.HORIZONTAL);
106     hscrollHolder.setLayout(borderLayout10);
107     hscrollFillerPanel.setBackground(Color.white);
108     hscrollFillerPanel.setPreferredSize(new Dimension(70, 10));
109     hscrollHolder.setBackground(Color.white);
110     annotationScroller.setBorder(null);
111     annotationScroller.setPreferredSize(new Dimension(10, 80));
112     this.setPreferredSize(new Dimension(220, 166));
113
114     sequenceHolderPanel.add(scalePanelHolder, BorderLayout.NORTH);
115     sequenceHolderPanel.add(seqPanelHolder, BorderLayout.CENTER);
116     seqPanelHolder.add(vscroll, BorderLayout.EAST);
117     sequenceHolderPanel.add(annotationScroller, BorderLayout.SOUTH);
118
119     // jPanel3.add(secondaryPanelHolder, BorderLayout.SOUTH);
120     this.add(idPanelHolder, BorderLayout.WEST);
121     idPanelHolder.add(idSpaceFillerPanel1, BorderLayout.NORTH);
122     idPanelHolder.add(annotationSpaceFillerHolder, BorderLayout.SOUTH);
123     this.add(hscrollHolder, BorderLayout.SOUTH);
124     hscrollHolder.add(hscroll, BorderLayout.CENTER);
125     hscrollHolder.add(hscrollFillerPanel, BorderLayout.WEST);
126     this.add(sequenceHolderPanel, BorderLayout.CENTER);
127   }
128 }