X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fjbgui%2FGAlignmentPanel.java;h=efbc6af31bd1fa6103c805f68c450c221e412c00;hb=17e77c3f2949a0729322b4a8d907f3f34b6a9914;hp=d9e576ae647f2c667d3e7c19636ec1448dbdd47f;hpb=c59fb56cb143b05c5643a71f5b39996ac1cd2fef;p=jalview.git diff --git a/src/jalview/jbgui/GAlignmentPanel.java b/src/jalview/jbgui/GAlignmentPanel.java index d9e576a..efbc6af 100755 --- a/src/jalview/jbgui/GAlignmentPanel.java +++ b/src/jalview/jbgui/GAlignmentPanel.java @@ -1,39 +1,78 @@ -/******************** - * 2004 Jalview Reengineered - * Barton Group - * Dundee University - * - * AM Waterhouse - *******************/ - +/* + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9) + * Copyright (C) 2015 The Jalview Authors + * + * This file is part of Jalview. + * + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ package jalview.jbgui; -import java.awt.*; -import javax.swing.*; -import javax.swing.border.*; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.Dimension; + +import javax.swing.BorderFactory; +import javax.swing.ButtonGroup; +import javax.swing.JPanel; +import javax.swing.JScrollBar; +import javax.swing.JScrollPane; +import javax.swing.border.Border; public class GAlignmentPanel extends JPanel { protected JPanel sequenceHolderPanel = new JPanel(); + protected JScrollBar vscroll = new JScrollBar(); - protected JScrollBar hscroll = new JScrollBar(); + + protected JScrollBar hscroll = new JScrollBar(); + protected JPanel seqPanelHolder = new JPanel(); + BorderLayout borderLayout1 = new BorderLayout(); + BorderLayout borderLayout3 = new BorderLayout(); + protected JPanel scalePanelHolder = new JPanel(); + protected JPanel idPanelHolder = new JPanel(); + BorderLayout borderLayout5 = new BorderLayout(); + protected JPanel idSpaceFillerPanel1 = new JPanel(); + public JPanel annotationSpaceFillerHolder = new JPanel(); + BorderLayout borderLayout6 = new BorderLayout(); + ButtonGroup buttonGroup1 = new ButtonGroup(); + BorderLayout borderLayout7 = new BorderLayout(); + JPanel hscrollHolder = new JPanel(); + BorderLayout borderLayout10 = new BorderLayout(); + protected JPanel hscrollFillerPanel = new JPanel(); + BorderLayout borderLayout11 = new BorderLayout(); + public JScrollPane annotationScroller = new JScrollPane(); + Border border1; + BorderLayout borderLayout4 = new BorderLayout(); public GAlignmentPanel() @@ -41,19 +80,20 @@ public class GAlignmentPanel extends JPanel try { jbInit(); - } - catch(Exception e) + } catch (Exception e) { e.printStackTrace(); } } + private void jbInit() throws Exception { - border1 = BorderFactory.createLineBorder(Color.gray,1); + border1 = BorderFactory.createLineBorder(Color.gray, 1); idPanelHolder.setBorder(null); idPanelHolder.setPreferredSize(new Dimension(70, 10)); this.setLayout(borderLayout7); - sequenceHolderPanel.setMaximumSize(new Dimension(2147483647, 2147483647)); + sequenceHolderPanel + .setMaximumSize(new Dimension(2147483647, 2147483647)); sequenceHolderPanel.setMinimumSize(new Dimension(150, 150)); sequenceHolderPanel.setPreferredSize(new Dimension(150, 150)); sequenceHolderPanel.setLayout(borderLayout3); @@ -77,20 +117,19 @@ public class GAlignmentPanel extends JPanel annotationScroller.setBorder(null); annotationScroller.setPreferredSize(new Dimension(10, 80)); this.setPreferredSize(new Dimension(220, 166)); - this.setRequestFocusEnabled(true); - sequenceHolderPanel.add(scalePanelHolder, BorderLayout.NORTH); - sequenceHolderPanel.add(seqPanelHolder, BorderLayout.CENTER); + + sequenceHolderPanel.add(scalePanelHolder, BorderLayout.NORTH); + sequenceHolderPanel.add(seqPanelHolder, BorderLayout.CENTER); seqPanelHolder.add(vscroll, BorderLayout.EAST); sequenceHolderPanel.add(annotationScroller, BorderLayout.SOUTH); - // jPanel3.add(secondaryPanelHolder, BorderLayout.SOUTH); + + // jPanel3.add(secondaryPanelHolder, BorderLayout.SOUTH); this.add(idPanelHolder, BorderLayout.WEST); - idPanelHolder.add(idSpaceFillerPanel1, BorderLayout.NORTH); + idPanelHolder.add(idSpaceFillerPanel1, BorderLayout.NORTH); idPanelHolder.add(annotationSpaceFillerHolder, BorderLayout.SOUTH); - this.add(hscrollHolder, BorderLayout.SOUTH); + this.add(hscrollHolder, BorderLayout.SOUTH); hscrollHolder.add(hscroll, BorderLayout.CENTER); - hscrollHolder.add(hscrollFillerPanel, BorderLayout.WEST); - this.add(sequenceHolderPanel, BorderLayout.CENTER); + hscrollHolder.add(hscrollFillerPanel, BorderLayout.WEST); + this.add(sequenceHolderPanel, BorderLayout.CENTER); } - - }