JAL-1432 updated copyright notices
[jalview.git] / src / jalview / jbgui / GAlignmentPanel.java
1 /*
2  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1)
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 of the License, or (at your option) any later version.
10  *  
11  * Jalview is distributed in the hope that it will be useful, but 
12  * WITHOUT ANY WARRANTY; without even the implied warranty 
13  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14  * PURPOSE.  See the GNU General Public License for more details.
15  * 
16  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
17  * The Jalview Authors are detailed in the 'AUTHORS' file.
18  */
19 package jalview.jbgui;
20
21 import java.awt.*;
22 import javax.swing.*;
23 import javax.swing.border.*;
24
25 public class GAlignmentPanel extends JPanel
26 {
27   protected JPanel sequenceHolderPanel = new JPanel();
28
29   protected JScrollBar vscroll = new JScrollBar();
30
31   protected JScrollBar hscroll = new JScrollBar();
32
33   protected JPanel seqPanelHolder = new JPanel();
34
35   BorderLayout borderLayout1 = new BorderLayout();
36
37   BorderLayout borderLayout3 = new BorderLayout();
38
39   protected JPanel scalePanelHolder = new JPanel();
40
41   protected JPanel idPanelHolder = new JPanel();
42
43   BorderLayout borderLayout5 = new BorderLayout();
44
45   protected JPanel idSpaceFillerPanel1 = new JPanel();
46
47   public JPanel annotationSpaceFillerHolder = new JPanel();
48
49   BorderLayout borderLayout6 = new BorderLayout();
50
51   ButtonGroup buttonGroup1 = new ButtonGroup();
52
53   BorderLayout borderLayout7 = new BorderLayout();
54
55   JPanel hscrollHolder = new JPanel();
56
57   BorderLayout borderLayout10 = new BorderLayout();
58
59   protected JPanel hscrollFillerPanel = new JPanel();
60
61   BorderLayout borderLayout11 = new BorderLayout();
62
63   public JScrollPane annotationScroller = new JScrollPane();
64
65   Border border1;
66
67   BorderLayout borderLayout4 = new BorderLayout();
68
69   public GAlignmentPanel()
70   {
71     try
72     {
73       jbInit();
74     } catch (Exception e)
75     {
76       e.printStackTrace();
77     }
78   }
79
80   private void jbInit() throws Exception
81   {
82     border1 = BorderFactory.createLineBorder(Color.gray, 1);
83     idPanelHolder.setBorder(null);
84     idPanelHolder.setPreferredSize(new Dimension(70, 10));
85     this.setLayout(borderLayout7);
86     sequenceHolderPanel
87             .setMaximumSize(new Dimension(2147483647, 2147483647));
88     sequenceHolderPanel.setMinimumSize(new Dimension(150, 150));
89     sequenceHolderPanel.setPreferredSize(new Dimension(150, 150));
90     sequenceHolderPanel.setLayout(borderLayout3);
91     seqPanelHolder.setLayout(borderLayout1);
92     scalePanelHolder.setBackground(Color.white);
93     scalePanelHolder.setMinimumSize(new Dimension(10, 80));
94     scalePanelHolder.setPreferredSize(new Dimension(10, 30));
95     scalePanelHolder.setLayout(borderLayout6);
96     idPanelHolder.setLayout(borderLayout5);
97     idSpaceFillerPanel1.setBackground(Color.white);
98     idSpaceFillerPanel1.setPreferredSize(new Dimension(10, 30));
99     idSpaceFillerPanel1.setLayout(borderLayout11);
100     annotationSpaceFillerHolder.setBackground(Color.white);
101     annotationSpaceFillerHolder.setPreferredSize(new Dimension(10, 80));
102     annotationSpaceFillerHolder.setLayout(borderLayout4);
103     hscroll.setOrientation(JScrollBar.HORIZONTAL);
104     hscrollHolder.setLayout(borderLayout10);
105     hscrollFillerPanel.setBackground(Color.white);
106     hscrollFillerPanel.setPreferredSize(new Dimension(70, 10));
107     hscrollHolder.setBackground(Color.white);
108     annotationScroller.setBorder(null);
109     annotationScroller.setPreferredSize(new Dimension(10, 80));
110     this.setPreferredSize(new Dimension(220, 166));
111
112     sequenceHolderPanel.add(scalePanelHolder, BorderLayout.NORTH);
113     sequenceHolderPanel.add(seqPanelHolder, BorderLayout.CENTER);
114     seqPanelHolder.add(vscroll, BorderLayout.EAST);
115     sequenceHolderPanel.add(annotationScroller, BorderLayout.SOUTH);
116
117     // jPanel3.add(secondaryPanelHolder, BorderLayout.SOUTH);
118     this.add(idPanelHolder, BorderLayout.WEST);
119     idPanelHolder.add(idSpaceFillerPanel1, BorderLayout.NORTH);
120     idPanelHolder.add(annotationSpaceFillerHolder, BorderLayout.SOUTH);
121     this.add(hscrollHolder, BorderLayout.SOUTH);
122     hscrollHolder.add(hscroll, BorderLayout.CENTER);
123     hscrollHolder.add(hscrollFillerPanel, BorderLayout.WEST);
124     this.add(sequenceHolderPanel, BorderLayout.CENTER);
125   }
126 }