merge from 2_4_Release branch
[jalview.git] / src / jalview / jbgui / GSliderPanel.java
index 568c66a..e8df12d 100755 (executable)
-/*\r
- * Jalview - A Sequence Alignment Editor and Viewer\r
- * Copyright (C) 2007 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
-import java.awt.*;\r
-import java.awt.event.*;\r
-import javax.swing.*;\r
-\r
-/**\r
- * DOCUMENT ME!\r
- *\r
- * @author $author$\r
- * @version $Revision$\r
- */\r
-public class GSliderPanel\r
-    extends JPanel\r
-{\r
-  // this is used for conservation colours, PID colours and redundancy threshold\r
-  protected JSlider slider = new JSlider();\r
-  protected JTextField valueField = new JTextField();\r
-  protected JLabel label = new JLabel();\r
-  protected JPanel southPanel = new JPanel();\r
-  GridLayout gridLayout1 = new GridLayout();\r
-  JPanel jPanel2 = new JPanel();\r
-  protected JButton applyButton = new JButton();\r
-  protected JButton undoButton = new JButton();\r
-  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
-   * Creates a new GSliderPanel object.\r
-   */\r
-  public GSliderPanel()\r
-  {\r
-    try\r
-    {\r
-      jbInit();\r
-    }\r
-    catch (Exception e)\r
-    {\r
-      e.printStackTrace();\r
-    }\r
-  }\r
-\r
-  /**\r
-   * DOCUMENT ME!\r
-   *\r
-   * @throws Exception DOCUMENT ME!\r
-   */\r
-  private void jbInit()\r
-      throws Exception\r
-  {\r
-    this.setLayout(gridLayout1);\r
-    slider.setMajorTickSpacing(10);\r
-    slider.setMinorTickSpacing(1);\r
-    slider.setPaintTicks(true);\r
-    slider.setBackground(Color.white);\r
-    slider.setFont(new java.awt.Font("Verdana", 0, 11));\r
-    slider.setDoubleBuffered(true);\r
-    slider.addMouseListener(new MouseAdapter()\r
-    {\r
-      public void mouseReleased(MouseEvent e)\r
-      {\r
-        slider_mouseReleased(e);\r
-      }\r
-    });\r
-    valueField.setFont(new java.awt.Font("Verdana", 0, 11));\r
-    valueField.setMinimumSize(new Dimension(6, 14));\r
-    valueField.setPreferredSize(new Dimension(50, 12));\r
-    valueField.setText("");\r
-    valueField.setHorizontalAlignment(SwingConstants.CENTER);\r
-    valueField.addActionListener(new java.awt.event.ActionListener()\r
-    {\r
-      public void actionPerformed(ActionEvent e)\r
-      {\r
-        valueField_actionPerformed(e);\r
-      }\r
-    });\r
-    label.setFont(new java.awt.Font("Verdana", 0, 11));\r
-    label.setOpaque(false);\r
-    label.setHorizontalAlignment(SwingConstants.CENTER);\r
-    label.setText("set this label text");\r
-    southPanel.setLayout(borderLayout1);\r
-    gridLayout1.setRows(2);\r
-    jPanel2.setLayout(flowLayout1);\r
-    applyButton.setFont(new java.awt.Font("Verdana", 0, 11));\r
-    applyButton.setOpaque(false);\r
-    applyButton.setText("Apply");\r
-    applyButton.addActionListener(new java.awt.event.ActionListener()\r
-    {\r
-      public void actionPerformed(ActionEvent e)\r
-      {\r
-        applyButton_actionPerformed(e);\r
-      }\r
-    });\r
-    undoButton.setEnabled(false);\r
-    undoButton.setFont(new java.awt.Font("Verdana", 0, 11));\r
-    undoButton.setOpaque(false);\r
-    undoButton.setText("Undo");\r
-    undoButton.addActionListener(new java.awt.event.ActionListener()\r
-    {\r
-      public void actionPerformed(ActionEvent e)\r
-      {\r
-        undoButton_actionPerformed(e);\r
-      }\r
-    });\r
-    allGroupsCheck.setEnabled(false);\r
-    allGroupsCheck.setFont(new java.awt.Font("Verdana", 0, 11));\r
-    allGroupsCheck.setOpaque(false);\r
-    allGroupsCheck.setText("Apply to all Groups");\r
-    allGroupsCheck.addActionListener(new java.awt.event.ActionListener()\r
-    {\r
-      public void actionPerformed(ActionEvent e)\r
-      {\r
-        allGroupsCheck_actionPerformed(e);\r
-      }\r
-    });\r
-    this.setBackground(Color.white);\r
-    this.setPreferredSize(new Dimension(415, 84));\r
-    jPanel2.setOpaque(false);\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(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
-   *\r
-   * @param e DOCUMENT ME!\r
-   */\r
-  protected void valueField_actionPerformed(ActionEvent e)\r
-  {\r
-  }\r
-\r
-  /**\r
-   * DOCUMENT ME!\r
-   *\r
-   * @param e DOCUMENT ME!\r
-   */\r
-  protected void applyButton_actionPerformed(ActionEvent e)\r
-  {\r
-  }\r
-\r
-  /**\r
-   * DOCUMENT ME!\r
-   *\r
-   * @param e DOCUMENT ME!\r
-   */\r
-  protected void undoButton_actionPerformed(ActionEvent e)\r
-  {\r
-  }\r
-\r
-  /**\r
-   * DOCUMENT ME!\r
-   *\r
-   * @param e DOCUMENT ME!\r
-   */\r
-  protected void allGroupsCheck_actionPerformed(ActionEvent e)\r
-  {\r
-  }\r
-\r
-  public void slider_mouseReleased(MouseEvent e)\r
-  {\r
-\r
-  }\r
-}\r
+/*
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4)
+ * Copyright (C) 2008 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.jbgui;
+
+import java.awt.*;
+import java.awt.event.*;
+import javax.swing.*;
+
+/**
+ * DOCUMENT ME!
+ * 
+ * @author $author$
+ * @version $Revision$
+ */
+public class GSliderPanel extends JPanel
+{
+  // this is used for conservation colours, PID colours and redundancy threshold
+  protected JSlider slider = new JSlider();
+
+  protected JTextField valueField = new JTextField();
+
+  protected JLabel label = new JLabel();
+
+  protected JPanel southPanel = new JPanel();
+
+  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();
+
+  BorderLayout borderLayout1 = new BorderLayout();
+
+  JPanel jPanel1 = new JPanel();
+
+  BorderLayout borderLayout2 = new BorderLayout();
+
+  /**
+   * Creates a new GSliderPanel object.
+   */
+  public GSliderPanel()
+  {
+    try
+    {
+      jbInit();
+    } catch (Exception e)
+    {
+      e.printStackTrace();
+    }
+  }
+
+  /**
+   * DOCUMENT ME!
+   * 
+   * @throws Exception
+   *                 DOCUMENT ME!
+   */
+  private void jbInit() throws Exception
+  {
+    this.setLayout(gridLayout1);
+    slider.setMajorTickSpacing(10);
+    slider.setMinorTickSpacing(1);
+    slider.setPaintTicks(true);
+    slider.setBackground(Color.white);
+    slider.setFont(new java.awt.Font("Verdana", 0, 11));
+    slider.setDoubleBuffered(true);
+    slider.addMouseListener(new MouseAdapter()
+    {
+      public void mouseReleased(MouseEvent e)
+      {
+        slider_mouseReleased(e);
+      }
+    });
+    valueField.setFont(new java.awt.Font("Verdana", 0, 11));
+    valueField.setMinimumSize(new Dimension(6, 14));
+    valueField.setPreferredSize(new Dimension(50, 12));
+    valueField.setText("");
+    valueField.setHorizontalAlignment(SwingConstants.CENTER);
+    valueField.addActionListener(new java.awt.event.ActionListener()
+    {
+      public void actionPerformed(ActionEvent e)
+      {
+        valueField_actionPerformed(e);
+      }
+    });
+    label.setFont(new java.awt.Font("Verdana", 0, 11));
+    label.setOpaque(false);
+    label.setHorizontalAlignment(SwingConstants.CENTER);
+    label.setText("set this label text");
+    southPanel.setLayout(borderLayout1);
+    gridLayout1.setRows(2);
+    jPanel2.setLayout(flowLayout1);
+    applyButton.setFont(new java.awt.Font("Verdana", 0, 11));
+    applyButton.setOpaque(false);
+    applyButton.setText("Apply");
+    applyButton.addActionListener(new java.awt.event.ActionListener()
+    {
+      public void actionPerformed(ActionEvent e)
+      {
+        applyButton_actionPerformed(e);
+      }
+    });
+    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()
+    {
+      public void actionPerformed(ActionEvent e)
+      {
+        undoButton_actionPerformed(e);
+      }
+    });
+    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(Color.white);
+    this.setPreferredSize(new Dimension(415, 84));
+    jPanel2.setOpaque(false);
+    southPanel.setOpaque(false);
+    jPanel1.setLayout(borderLayout2);
+    jPanel1.setOpaque(false);
+    this.add(jPanel2, null);
+    jPanel2.add(label, null);
+    jPanel2.add(applyButton, null);
+    jPanel2.add(undoButton, null);
+    this.add(southPanel, null);
+    southPanel.add(jPanel1, java.awt.BorderLayout.EAST);
+    southPanel.add(slider, java.awt.BorderLayout.CENTER);
+    jPanel1.add(valueField, java.awt.BorderLayout.CENTER);
+    jPanel1.add(allGroupsCheck, java.awt.BorderLayout.EAST);
+  }
+
+  /**
+   * DOCUMENT ME!
+   * 
+   * @param e
+   *                DOCUMENT ME!
+   */
+  protected void valueField_actionPerformed(ActionEvent e)
+  {
+  }
+
+  /**
+   * DOCUMENT ME!
+   * 
+   * @param e
+   *                DOCUMENT ME!
+   */
+  protected void applyButton_actionPerformed(ActionEvent e)
+  {
+  }
+
+  /**
+   * DOCUMENT ME!
+   * 
+   * @param e
+   *                DOCUMENT ME!
+   */
+  protected void undoButton_actionPerformed(ActionEvent e)
+  {
+  }
+
+  /**
+   * DOCUMENT ME!
+   * 
+   * @param e
+   *                DOCUMENT ME!
+   */
+  protected void allGroupsCheck_actionPerformed(ActionEvent e)
+  {
+  }
+
+  public void slider_mouseReleased(MouseEvent e)
+  {
+
+  }
+}