Clover icon

Coverage Report

  1. Project Clover database Wed Nov 13 2024 18:27:33 GMT
  2. Package jalview.jbgui

File GAlignmentPanel.java

 

Coverage histogram

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

Code metrics

0
46
4
1
153
98
5
0.11
11.5
4
1.25

Classes

Class Line # Actions
GAlignmentPanel 35 46 5
0.9494%
 

Contributing tests

This file is covered by 180 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  3824 toggle static JPanel newJPanel()
64    { // BH 2019
65  3824 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  3824 p.setBackground(Color.white);
70  3824 return p;
71    }
72   
73    protected JPanel sequenceHolderPanel = newJPanel();
74   
75    protected JPanel seqPanelHolder = newJPanel();
76   
77    protected JPanel scalePanelHolder = newJPanel();
78   
79    public JPanel idPanelHolder = newJPanel();
80   
81    protected JPanel idSpaceFillerPanel1 = newJPanel();
82   
83    public JPanel annotationSpaceFillerHolder = newJPanel();
84   
85    protected JPanel hscrollFillerPanel = newJPanel();
86   
87    JPanel hscrollHolder = newJPanel();
88   
 
89  478 toggle public GAlignmentPanel()
90    {
91  478 try
92    {
93  478 jbInit();
94    } catch (Exception e)
95    {
96  0 e.printStackTrace();
97    }
98    }
99   
 
100  478 toggle private void jbInit() throws Exception
101    {
102    // annotationScroller.setBackground(Color.white); // BH 2019
103   
104  478 border1 = BorderFactory.createLineBorder(Color.gray, 1);
105  478 idPanelHolder.setBorder(null);
106  478 idPanelHolder.setPreferredSize(new Dimension(70, 10));
107  478 this.setLayout(borderLayout7);
108  478 sequenceHolderPanel
109    .setMaximumSize(new Dimension(2147483647, 2147483647));
110  478 sequenceHolderPanel.setMinimumSize(new Dimension(150, 150));
111  478 sequenceHolderPanel.setPreferredSize(new Dimension(150, 150));
112  478 sequenceHolderPanel.setLayout(borderLayout3);
113  478 seqPanelHolder.setLayout(borderLayout1);
114  478 scalePanelHolder.setBackground(Color.white);
115  478 scalePanelHolder.setMinimumSize(new Dimension(10, 80));
116  478 scalePanelHolder.setPreferredSize(new Dimension(10, 30));
117  478 scalePanelHolder.setLayout(borderLayout6);
118  478 idPanelHolder.setLayout(borderLayout5);
119  478 idSpaceFillerPanel1.setBackground(Color.white);
120  478 idSpaceFillerPanel1.setPreferredSize(new Dimension(10, 30));
121  478 idSpaceFillerPanel1.setLayout(borderLayout11);
122  478 annotationSpaceFillerHolder.setBackground(Color.white);
123  478 annotationSpaceFillerHolder.setPreferredSize(new Dimension(10, 80));
124  478 annotationSpaceFillerHolder.setLayout(borderLayout4);
125  478 hscroll.setOrientation(JScrollBar.HORIZONTAL);
126  478 hscrollHolder.setLayout(borderLayout10);
127  478 hscrollFillerPanel.setBackground(Color.white);
128  478 hscrollFillerPanel.setPreferredSize(new Dimension(70, 10));
129  478 hscrollHolder.setBackground(Color.white);
130  478 annotationScroller.setBorder(null);
131  478 annotationScroller.setPreferredSize(new Dimension(10, 80));
132  478 this.setPreferredSize(new Dimension(220, 166));
133   
134  478 sequenceHolderPanel.add(scalePanelHolder, BorderLayout.NORTH);
135  478 sequenceHolderPanel.add(seqPanelHolder, BorderLayout.CENTER);
136  478 seqPanelHolder.add(vscroll, BorderLayout.EAST);
137  478 sequenceHolderPanel.add(annotationScroller, BorderLayout.SOUTH);
138   
139    // jPanel3.add(secondaryPanelHolder, BorderLayout.SOUTH);
140  478 this.add(idPanelHolder, BorderLayout.WEST);
141  478 idPanelHolder.add(idSpaceFillerPanel1, BorderLayout.NORTH);
142  478 idPanelHolder.add(annotationSpaceFillerHolder, BorderLayout.SOUTH);
143  478 this.add(hscrollHolder, BorderLayout.SOUTH);
144  478 hscrollHolder.add(hscroll, BorderLayout.CENTER);
145  478 hscrollHolder.add(hscrollFillerPanel, BorderLayout.WEST);
146  478 this.add(sequenceHolderPanel, BorderLayout.CENTER);
147    }
148   
 
149  0 toggle public JPanel getIdSpaceFillerPanel1()
150    {
151  0 return idSpaceFillerPanel1;
152    }
153    }