New panel layouts
authoramwaterhouse <Andrew Waterhouse>
Fri, 7 Jul 2006 13:03:39 +0000 (13:03 +0000)
committeramwaterhouse <Andrew Waterhouse>
Fri, 7 Jul 2006 13:03:39 +0000 (13:03 +0000)
src/jalview/jbgui/GSliderPanel.java

index c452d11..d245442 100755 (executable)
@@ -1,20 +1,20 @@
-/*
-* 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
+/*\r
+* Jalview - A Sequence Alignment Editor and Viewer\r
+* Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle\r
+*\r
+* This program is free software; you can redistribute it and/or\r
+* modify it under the terms of the GNU General Public License\r
+* as published by the Free Software Foundation; either version 2\r
+* of the License, or (at your option) any later version.\r
+*\r
+* This program is distributed in the hope that it will be useful,\r
+* but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+* GNU General Public License for more details.\r
+*\r
+* You should have received a copy of the GNU General Public License\r
+* along with this program; if not, write to the Free Software\r
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA\r
 */\r
 package jalview.jbgui;\r
 \r
@@ -22,7 +22,7 @@ import java.awt.*;
 import java.awt.event.*;\r
 \r
 import javax.swing.*;\r
-\r
+import java.awt.BorderLayout;\r
 \r
 /**\r
  * DOCUMENT ME!\r
@@ -36,7 +36,7 @@ public class GSliderPanel extends JPanel
     protected JSlider slider = new JSlider();\r
     protected JTextField valueField = new JTextField();\r
     protected JLabel label = new JLabel();\r
-    JPanel jPanel1 = new JPanel();\r
+    protected JPanel southPanel = new JPanel();\r
     GridLayout gridLayout1 = new GridLayout();\r
     JPanel jPanel2 = new JPanel();\r
     protected JButton applyButton = new JButton();\r
@@ -44,8 +44,10 @@ public class GSliderPanel extends JPanel
     FlowLayout flowLayout1 = new FlowLayout();\r
     protected JCheckBox allGroupsCheck = new JCheckBox();\r
     BorderLayout borderLayout1 = new BorderLayout();\r
+  JPanel jPanel1 = new JPanel();\r
+  BorderLayout borderLayout2 = new BorderLayout();\r
 \r
-    /**\r
+  /**\r
      * Creates a new GSliderPanel object.\r
      */\r
     public GSliderPanel()\r
@@ -90,7 +92,7 @@ public class GSliderPanel extends JPanel
         label.setOpaque(false);\r
         label.setHorizontalAlignment(SwingConstants.CENTER);\r
         label.setText("set this label text");\r
-        jPanel1.setLayout(borderLayout1);\r
+    southPanel.setLayout(borderLayout1);\r
         gridLayout1.setRows(2);\r
         jPanel2.setLayout(flowLayout1);\r
         applyButton.setFont(new java.awt.Font("Verdana", 0, 11));\r
@@ -128,16 +130,19 @@ public class GSliderPanel extends JPanel
         this.setBackground(Color.white);\r
         this.setPreferredSize(new Dimension(415, 84));\r
         jPanel2.setOpaque(false);\r
-        jPanel1.setOpaque(false);\r
-        this.add(jPanel2, null);\r
+    southPanel.setOpaque(false);\r
+    jPanel1.setLayout(borderLayout2);\r
+    jPanel1.setOpaque(false);\r
+    this.add(jPanel2, null);\r
         jPanel2.add(label, null);\r
         jPanel2.add(applyButton, null);\r
         jPanel2.add(undoButton, null);\r
-        this.add(jPanel1, null);\r
-        jPanel1.add(slider, BorderLayout.WEST);\r
-        jPanel1.add(valueField, BorderLayout.CENTER);\r
-        jPanel1.add(allGroupsCheck, BorderLayout.EAST);\r
-    }\r
+        this.add(southPanel, null);\r
+    southPanel.add(jPanel1, java.awt.BorderLayout.EAST);\r
+    southPanel.add(slider, java.awt.BorderLayout.CENTER);\r
+    jPanel1.add(valueField, java.awt.BorderLayout.CENTER);\r
+    jPanel1.add(allGroupsCheck, java.awt.BorderLayout.EAST);\r
+  }\r
 \r
     /**\r
      * DOCUMENT ME!\r