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