X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fjbgui%2FGAlignmentPanel.java;h=fc66218a9d37213d25dba6c2c4837b3e75a854de;hb=797df64fa2a0a30773d0f48f5494d4155e5a8be3;hp=c361c1e02a840fc7b10dc7521b0147f5fc627552;hpb=1ecf6419aba86993b3c223bf5ec0fa79427baf85;p=jalview.git diff --git a/src/jalview/jbgui/GAlignmentPanel.java b/src/jalview/jbgui/GAlignmentPanel.java index c361c1e..fc66218 100755 --- a/src/jalview/jbgui/GAlignmentPanel.java +++ b/src/jalview/jbgui/GAlignmentPanel.java @@ -1,86 +1,125 @@ -/******************** - * 2004 Jalview Reengineered - * Barton Group - * Dundee University - * - * AM Waterhouse - *******************/ - +/* + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7) + * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle + * + * 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 . + */ package jalview.jbgui; import java.awt.*; import javax.swing.*; +import javax.swing.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(); - JPanel jPanel2 = new JPanel(); - BorderLayout borderLayout2 = new BorderLayout(); - protected JPanel scorePanelHolder = new JPanel(); + protected JPanel scalePanelHolder = new JPanel(); + protected JPanel idPanelHolder = new JPanel(); + BorderLayout borderLayout5 = new BorderLayout(); - JPanel jPanel3 = new JPanel(); - protected JPanel idSpaceFillerPanel = new JPanel(); - BorderLayout borderLayout4 = 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() { try { jbInit(); - } - catch(Exception e) + } catch (Exception e) { e.printStackTrace(); } } + private void jbInit() throws Exception { + 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); seqPanelHolder.setLayout(borderLayout1); - jPanel2.setBackground(new Color(212, 208, 230)); - jPanel2.setBorder(null); - jPanel2.setLayout(borderLayout2); scalePanelHolder.setBackground(Color.white); scalePanelHolder.setMinimumSize(new Dimension(10, 80)); scalePanelHolder.setPreferredSize(new Dimension(10, 30)); scalePanelHolder.setLayout(borderLayout6); - scorePanelHolder.setBackground(Color.white); - scorePanelHolder.setPreferredSize(new Dimension(10, 80)); - scorePanelHolder.setLayout(borderLayout4); idPanelHolder.setLayout(borderLayout5); - jPanel3.setBackground(Color.white); - jPanel3.setPreferredSize(new Dimension(10, 30)); - idSpaceFillerPanel.setBackground(Color.white); - idSpaceFillerPanel.setPreferredSize(new Dimension(10, 80)); + idSpaceFillerPanel1.setBackground(Color.white); + idSpaceFillerPanel1.setPreferredSize(new Dimension(10, 30)); + idSpaceFillerPanel1.setLayout(borderLayout11); + annotationSpaceFillerHolder.setBackground(Color.white); + annotationSpaceFillerHolder.setPreferredSize(new Dimension(10, 80)); + annotationSpaceFillerHolder.setLayout(borderLayout4); hscroll.setOrientation(JScrollBar.HORIZONTAL); - vscroll.setEnabled(true); - sequenceHolderPanel.add(scorePanelHolder, BorderLayout.SOUTH); - sequenceHolderPanel.add(scalePanelHolder, BorderLayout.NORTH); - sequenceHolderPanel.add(seqPanelHolder, BorderLayout.CENTER); - this.add(jPanel2, BorderLayout.CENTER); - jPanel2.add(sequenceHolderPanel, BorderLayout.CENTER); + hscrollHolder.setLayout(borderLayout10); + hscrollFillerPanel.setBackground(Color.white); + hscrollFillerPanel.setPreferredSize(new Dimension(70, 10)); + hscrollHolder.setBackground(Color.white); + annotationScroller.setBorder(null); + annotationScroller.setPreferredSize(new Dimension(10, 80)); + this.setPreferredSize(new Dimension(220, 166)); + + sequenceHolderPanel.add(scalePanelHolder, BorderLayout.NORTH); + sequenceHolderPanel.add(seqPanelHolder, BorderLayout.CENTER); seqPanelHolder.add(vscroll, BorderLayout.EAST); - seqPanelHolder.add(hscroll, BorderLayout.SOUTH); + sequenceHolderPanel.add(annotationScroller, BorderLayout.SOUTH); + + // jPanel3.add(secondaryPanelHolder, BorderLayout.SOUTH); this.add(idPanelHolder, BorderLayout.WEST); - idPanelHolder.add(jPanel3, BorderLayout.NORTH); - idPanelHolder.add(idSpaceFillerPanel, BorderLayout.SOUTH); + idPanelHolder.add(idSpaceFillerPanel1, BorderLayout.NORTH); + idPanelHolder.add(annotationSpaceFillerHolder, BorderLayout.SOUTH); + this.add(hscrollHolder, BorderLayout.SOUTH); + hscrollHolder.add(hscroll, BorderLayout.CENTER); + hscrollHolder.add(hscrollFillerPanel, BorderLayout.WEST); + this.add(sequenceHolderPanel, BorderLayout.CENTER); } - - }