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