Clover icon

Coverage Report

  1. Project Clover database Thu Aug 13 2020 12:04:21 BST
  2. Package jalview.jbgui

File GAlignmentPanel.java

 

Coverage histogram

../../img/srcFileCovDistChart10.png
0% of files have more coverage

Code metrics

0
45
3
1
143
93
4
0.09
15
3
1.33

Classes

Class Line # Actions
GAlignmentPanel 35 45 4
0.979166797.9%
 

Contributing tests

This file is covered by 94 tests. .

Source view

1    /*
2    * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3    * Copyright (C) $$Year-Rel$$ 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.BorderLayout;
24    import java.awt.Color;
25    import java.awt.Dimension;
26   
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;
33   
34    @SuppressWarnings("serial")
 
35    public class GAlignmentPanel extends JPanel
36    {
37    protected JScrollBar vscroll = new JScrollBar();
38   
39    protected JScrollBar hscroll = new JScrollBar();
40   
41    BorderLayout borderLayout1 = new BorderLayout();
42   
43    BorderLayout borderLayout3 = new BorderLayout();
44   
45    BorderLayout borderLayout5 = new BorderLayout();
46   
47    BorderLayout borderLayout6 = new BorderLayout();
48   
49    ButtonGroup buttonGroup1 = new ButtonGroup();
50   
51    BorderLayout borderLayout7 = new BorderLayout();
52   
53    BorderLayout borderLayout10 = new BorderLayout();
54   
55    BorderLayout borderLayout11 = new BorderLayout();
56   
57    public JScrollPane annotationScroller = new JScrollPane();
58   
59    Border border1;
60   
61    BorderLayout borderLayout4 = new BorderLayout();
62   
63   
 
64  2136 toggle static JPanel newJPanel() { // BH 2019
65  2136 JPanel p = new JPanel();
66    // leaving this in, as it prevents
67    // the checkerboard business, despite how
68    // funky that looks. Remove if you want to.
69  2136 p.setBackground(Color.white);
70  2136 return p;
71    }
72   
73    protected JPanel sequenceHolderPanel = newJPanel();
74    protected JPanel seqPanelHolder = newJPanel();
75    protected JPanel scalePanelHolder = newJPanel();
76    protected JPanel idPanelHolder = newJPanel();
77    protected JPanel idSpaceFillerPanel1 = newJPanel();
78    public JPanel annotationSpaceFillerHolder = newJPanel();
79    protected JPanel hscrollFillerPanel = newJPanel();
80    JPanel hscrollHolder = newJPanel();
81   
82   
83   
 
84  267 toggle public GAlignmentPanel()
85    {
86  267 try
87    {
88  267 jbInit();
89    } catch (Exception e)
90    {
91  0 e.printStackTrace();
92    }
93    }
94   
 
95  267 toggle private void jbInit() throws Exception
96    {
97    // annotationScroller.setBackground(Color.white); // BH 2019
98   
99  267 border1 = BorderFactory.createLineBorder(Color.gray, 1);
100  267 idPanelHolder.setBorder(null);
101  267 idPanelHolder.setPreferredSize(new Dimension(70, 10));
102  267 this.setLayout(borderLayout7);
103  267 sequenceHolderPanel
104    .setMaximumSize(new Dimension(2147483647, 2147483647));
105  267 sequenceHolderPanel.setMinimumSize(new Dimension(150, 150));
106  267 sequenceHolderPanel.setPreferredSize(new Dimension(150, 150));
107  267 sequenceHolderPanel.setLayout(borderLayout3);
108  267 seqPanelHolder.setLayout(borderLayout1);
109  267 scalePanelHolder.setBackground(Color.white);
110  267 scalePanelHolder.setMinimumSize(new Dimension(10, 80));
111  267 scalePanelHolder.setPreferredSize(new Dimension(10, 30));
112  267 scalePanelHolder.setLayout(borderLayout6);
113  267 idPanelHolder.setLayout(borderLayout5);
114  267 idSpaceFillerPanel1.setBackground(Color.white);
115  267 idSpaceFillerPanel1.setPreferredSize(new Dimension(10, 30));
116  267 idSpaceFillerPanel1.setLayout(borderLayout11);
117  267 annotationSpaceFillerHolder.setBackground(Color.white);
118  267 annotationSpaceFillerHolder.setPreferredSize(new Dimension(10, 80));
119  267 annotationSpaceFillerHolder.setLayout(borderLayout4);
120  267 hscroll.setOrientation(JScrollBar.HORIZONTAL);
121  267 hscrollHolder.setLayout(borderLayout10);
122  267 hscrollFillerPanel.setBackground(Color.white);
123  267 hscrollFillerPanel.setPreferredSize(new Dimension(70, 10));
124  267 hscrollHolder.setBackground(Color.white);
125  267 annotationScroller.setBorder(null);
126  267 annotationScroller.setPreferredSize(new Dimension(10, 80));
127  267 this.setPreferredSize(new Dimension(220, 166));
128   
129  267 sequenceHolderPanel.add(scalePanelHolder, BorderLayout.NORTH);
130  267 sequenceHolderPanel.add(seqPanelHolder, BorderLayout.CENTER);
131  267 seqPanelHolder.add(vscroll, BorderLayout.EAST);
132  267 sequenceHolderPanel.add(annotationScroller, BorderLayout.SOUTH);
133   
134    // jPanel3.add(secondaryPanelHolder, BorderLayout.SOUTH);
135  267 this.add(idPanelHolder, BorderLayout.WEST);
136  267 idPanelHolder.add(idSpaceFillerPanel1, BorderLayout.NORTH);
137  267 idPanelHolder.add(annotationSpaceFillerHolder, BorderLayout.SOUTH);
138  267 this.add(hscrollHolder, BorderLayout.SOUTH);
139  267 hscrollHolder.add(hscroll, BorderLayout.CENTER);
140  267 hscrollHolder.add(hscrollFillerPanel, BorderLayout.WEST);
141  267 this.add(sequenceHolderPanel, BorderLayout.CENTER);
142    }
143    }