Ability to apply to all groups added
authoramwaterhouse <Andrew Waterhouse>
Tue, 1 Feb 2005 19:00:12 +0000 (19:00 +0000)
committeramwaterhouse <Andrew Waterhouse>
Tue, 1 Feb 2005 19:00:12 +0000 (19:00 +0000)
src/jalview/jbgui/GSliderPanel.java

index 7921487..402fb6e 100755 (executable)
@@ -11,12 +11,13 @@ public class GSliderPanel extends JPanel
   protected JTextField valueField = new JTextField();
   protected JLabel label = new JLabel();
   JPanel jPanel1 = new JPanel();
-  BorderLayout borderLayout1 = new BorderLayout();
   GridLayout gridLayout1 = new GridLayout();
   JPanel jPanel2 = new JPanel();
   protected JButton applyButton = new JButton();
   protected JButton undoButton = new JButton();
   FlowLayout flowLayout1 = new FlowLayout();
+  protected JCheckBox allGroupsCheck = new JCheckBox();
+  FlowLayout flowLayout2 = new FlowLayout();
 
   public GSliderPanel()
   {
@@ -37,9 +38,10 @@ public class GSliderPanel extends JPanel
     slider.setPaintTicks(true);
     slider.setBackground(new Color(177, 177, 217));
     slider.setFont(new java.awt.Font("Verdana", 0, 11));
+    slider.setOpaque(false);
     valueField.setFont(new java.awt.Font("Verdana", 0, 11));
-    valueField.setMinimumSize(new Dimension(6, 21));
-    valueField.setPreferredSize(new Dimension(60, 21));
+    valueField.setMinimumSize(new Dimension(6, 14));
+    valueField.setPreferredSize(new Dimension(50, 21));
     valueField.setText("");
     valueField.setHorizontalAlignment(SwingConstants.CENTER);
     valueField.addActionListener(new java.awt.event.ActionListener()
@@ -49,15 +51,15 @@ public class GSliderPanel extends JPanel
         valueField_actionPerformed(e);
       }
     });
-    label.setBackground(new Color(177, 177, 217));
     label.setFont(new java.awt.Font("Verdana", 0, 11));
-    label.setOpaque(true);
+    label.setOpaque(false);
     label.setHorizontalAlignment(SwingConstants.CENTER);
     label.setText("set this label text");
-    jPanel1.setLayout(borderLayout1);
+    jPanel1.setLayout(flowLayout2);
     gridLayout1.setRows(2);
     jPanel2.setLayout(flowLayout1);
-    applyButton.setBackground(new Color(177, 177, 217));
+    applyButton.setFont(new java.awt.Font("Verdana", 0, 11));
+    applyButton.setOpaque(false);
     applyButton.setText("Apply");
     applyButton.addActionListener(new java.awt.event.ActionListener()
     {
@@ -66,8 +68,9 @@ public class GSliderPanel extends JPanel
         applyButton_actionPerformed(e);
       }
     });
-    undoButton.setBackground(new Color(177, 177, 217));
     undoButton.setEnabled(false);
+    undoButton.setFont(new java.awt.Font("Verdana", 0, 11));
+    undoButton.setOpaque(false);
     undoButton.setText("Undo");
     undoButton.addActionListener(new java.awt.event.ActionListener()
     {
@@ -76,13 +79,28 @@ public class GSliderPanel extends JPanel
         undoButton_actionPerformed(e);
       }
     });
-    jPanel2.setBackground(new Color(177, 177, 217));
+    allGroupsCheck.setEnabled(false);
+    allGroupsCheck.setFont(new java.awt.Font("Verdana", 0, 11));
+    allGroupsCheck.setOpaque(false);
+    allGroupsCheck.setText("Apply to all Groups");
+    allGroupsCheck.addActionListener(new java.awt.event.ActionListener()
+    {
+      public void actionPerformed(ActionEvent e)
+      {
+        allGroupsCheck_actionPerformed(e);
+      }
+    });
+    this.setBackground(new Color(177, 177, 217));
+    this.setPreferredSize(new Dimension(415, 84));
+    jPanel2.setOpaque(false);
+    jPanel1.setOpaque(false);
     this.add(jPanel2, null);
     jPanel2.add(label, null);
     jPanel2.add(applyButton, null);
     jPanel2.add(undoButton, null);this.add(jPanel1, null);
-    jPanel1.add(valueField,  BorderLayout.EAST);
-    jPanel1.add(slider, BorderLayout.CENTER);
+    jPanel1.add(slider, null);
+    jPanel1.add(valueField, null);
+    jPanel1.add(allGroupsCheck, null);
 
   }
 
@@ -101,4 +119,9 @@ public class GSliderPanel extends JPanel
 
   }
 
+  protected void allGroupsCheck_actionPerformed(ActionEvent e)
+  {
+
+  }
+
 }