/* * Jalview - A Sequence Alignment Editor and Viewer * Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle * * This program 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 2 * of the License, or (at your option) any later version. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ package jalview.jbappletgui; import java.awt.*; public class GAlignmentPanel extends Panel { protected Panel sequenceHolderPanel = new Panel(); protected Scrollbar vscroll = new Scrollbar(); protected Scrollbar hscroll = new Scrollbar(); protected Panel seqPanelHolder = new Panel(); BorderLayout borderLayout1 = new BorderLayout(); BorderLayout borderLayout3 = new BorderLayout(); protected Panel scalePanelHolder = new Panel(); protected Panel idPanelHolder = new Panel(); BorderLayout borderLayout5 = new BorderLayout(); protected Panel idSpaceFillerPanel1 = new Panel(); public Panel annotationSpaceFillerHolder = new Panel(); BorderLayout borderLayout6 = new BorderLayout(); BorderLayout borderLayout7 = new BorderLayout(); Panel hscrollHolder = new Panel(); BorderLayout borderLayout10 = new BorderLayout(); protected Panel hscrollFillerPanel = new Panel(); BorderLayout borderLayout11 = new BorderLayout(); public Panel annotationScroller = new Panel(); BorderLayout borderLayout4 = new BorderLayout(); BorderLayout borderLayout2 = new BorderLayout(); public GAlignmentPanel() { try { jbInit(); } catch (Exception e) { e.printStackTrace(); } } private void jbInit() throws Exception { // idPanelHolder.setPreferredSize(new Dimension(70, 10)); this.setLayout(borderLayout7); // sequenceHolderPanel.setPreferredSize(new Dimension(150, 150)); sequenceHolderPanel.setLayout(borderLayout3); seqPanelHolder.setLayout(borderLayout1); scalePanelHolder.setBackground(Color.white); // scalePanelHolder.setPreferredSize(new Dimension(10, 30)); scalePanelHolder.setLayout(borderLayout6); idPanelHolder.setLayout(borderLayout5); 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(Scrollbar.HORIZONTAL); hscrollHolder.setLayout(borderLayout10); hscrollFillerPanel.setBackground(Color.white); // hscrollFillerPanel.setPreferredSize(new Dimension(70, 10)); hscrollHolder.setBackground(Color.white); // annotationScroller.setPreferredSize(new Dimension(10, 80)); // this.setPreferredSize(new Dimension(220, 166)); seqPanelHolder.setBackground(Color.white); idPanelHolder.setBackground(Color.white); annotationScroller.setLayout(borderLayout2); sequenceHolderPanel.add(scalePanelHolder, BorderLayout.NORTH); sequenceHolderPanel.add(seqPanelHolder, BorderLayout.CENTER); seqPanelHolder.add(vscroll, BorderLayout.EAST); sequenceHolderPanel.add(annotationScroller, BorderLayout.SOUTH); // Panel3.add(secondaryPanelHolder, BorderLayout.SOUTH); this.add(idPanelHolder, BorderLayout.WEST); 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); } }