group autoannotation and consensus display settings
[jalview.git] / src / jalview / jbgui / GPreferences.java
index e28581f..6b2c0f4 100755 (executable)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4)
- * Copyright (C) 2008 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
+ * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1)
+ * Copyright (C) 2009 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
@@ -20,6 +20,7 @@ package jalview.jbgui;
 
 import java.awt.*;
 import java.awt.event.*;
+
 import javax.swing.*;
 import javax.swing.border.*;
 import javax.swing.event.*;
@@ -137,6 +138,10 @@ public class GPreferences extends JPanel
 
   JPanel jPanel3 = new JPanel();
 
+  JPanel autoAnnotSettings1 = new JPanel();
+
+  JPanel autoAnnotSettings2 = new JPanel();
+
   JPanel exportTab = new JPanel();
 
   JLabel epsLabel = new JLabel();
@@ -187,9 +192,20 @@ public class GPreferences extends JPanel
 
   protected JCheckBox rightAlign = new JCheckBox();
 
+  protected JCheckBox showUnconserved = new JCheckBox();
+
   protected JCheckBox idItalics = new JCheckBox();
 
   protected JCheckBox openoverv = new JCheckBox();
+  protected JCheckBox usagestats = new JCheckBox(); 
+  protected JCheckBox questionnaire = new JCheckBox();
+  protected JCheckBox versioncheck = new JCheckBox();
+  protected JLabel showGroupbits = new JLabel();
+  protected JLabel showConsensbits = new JLabel();
+  protected JCheckBox showConsensProfile = new JCheckBox();
+  protected JCheckBox showConsensHistogram = new JCheckBox();
+  protected JCheckBox showGroupConsensus = new JCheckBox();
+  protected JCheckBox showGroupConservation = new JCheckBox();
 
   /**
    * Creates a new GPreferences object.
@@ -254,6 +270,38 @@ public class GPreferences extends JPanel
     identity.setHorizontalTextPosition(SwingConstants.LEFT);
     identity.setSelected(true);
     identity.setText("Consensus");
+    showGroupbits.setFont(verdana11);
+    showGroupbits.setHorizontalAlignment(SwingConstants.RIGHT);
+    showGroupbits.setHorizontalTextPosition(SwingConstants.LEFT);
+    showGroupbits.setText("Group:");
+    showConsensbits.setFont(verdana11);
+    showConsensbits.setHorizontalAlignment(SwingConstants.RIGHT);
+    showConsensbits.setHorizontalTextPosition(SwingConstants.LEFT);
+    showConsensbits.setText("Consensus:");
+    showConsensHistogram.setEnabled(false);
+    showConsensHistogram.setFont(verdana11);
+    showConsensHistogram.setHorizontalAlignment(SwingConstants.RIGHT);
+    showConsensHistogram.setHorizontalTextPosition(SwingConstants.LEFT);
+    showConsensHistogram.setSelected(true);
+    showConsensHistogram.setText("Histogram");
+    showConsensProfile.setEnabled(false);
+    showConsensProfile.setFont(verdana11);
+    showConsensProfile.setHorizontalAlignment(SwingConstants.RIGHT);
+    showConsensProfile.setHorizontalTextPosition(SwingConstants.LEFT);
+    showConsensProfile.setSelected(true);
+    showConsensProfile.setText("Profile");
+    showGroupConsensus.setEnabled(false);
+    showGroupConsensus.setFont(verdana11);
+    showGroupConsensus.setHorizontalAlignment(SwingConstants.RIGHT);
+    showGroupConsensus.setHorizontalTextPosition(SwingConstants.LEFT);
+    showGroupConsensus.setSelected(true);
+    showGroupConsensus.setText("Consensus");
+    showGroupConservation.setEnabled(false);
+    showGroupConservation.setFont(verdana11);
+    showGroupConservation.setHorizontalAlignment(SwingConstants.RIGHT);
+    showGroupConservation.setHorizontalTextPosition(SwingConstants.LEFT);
+    showGroupConservation.setSelected(true);
+    showGroupConservation.setText("Conservation");
     annotations.setFont(verdana11);
     annotations.setHorizontalAlignment(SwingConstants.RIGHT);
     annotations.setHorizontalTextPosition(SwingConstants.LEFT);
@@ -266,6 +314,20 @@ public class GPreferences extends JPanel
         annotations_actionPerformed(e);
       }
     });
+    showUnconserved.setFont(verdana11);
+    showUnconserved.setHorizontalAlignment(SwingConstants.RIGHT);
+    showUnconserved.setHorizontalTextPosition(SwingConstants.LEFT);
+    //showUnconserved.setBounds(new Rectangle(169, 40, 200, 23));
+    showUnconserved.setSelected(true);
+    showUnconserved.setText("Show Unconserved");
+    showUnconserved.addActionListener(new ActionListener()
+    {
+      public void actionPerformed(ActionEvent e)
+      {
+        showunconserved_actionPerformed(e);
+      }
+    });
+    
     gapLabel.setFont(verdana11);
     gapLabel.setHorizontalAlignment(SwingConstants.RIGHT);
     gapLabel.setText("Gap Symbol ");
@@ -278,11 +340,11 @@ public class GPreferences extends JPanel
     fontLabel.setHorizontalAlignment(SwingConstants.RIGHT);
     fontLabel.setText("Font ");
     fontSizeCB.setFont(verdana11);
-    fontSizeCB.setBounds(new Rectangle(319, 111, 49, 21));
+    fontSizeCB.setBounds(new Rectangle(319, 101, 49, 21));
     fontStyleCB.setFont(verdana11);
-    fontStyleCB.setBounds(new Rectangle(367, 111, 70, 21));
+    fontStyleCB.setBounds(new Rectangle(367, 101, 70, 21));
     fontNameCB.setFont(verdana11);
-    fontNameCB.setBounds(new Rectangle(172, 111, 147, 21));
+    fontNameCB.setBounds(new Rectangle(172, 101, 147, 21));
     gapSymbolCB.setFont(verdana11);
     gapSymbolCB.setBounds(new Rectangle(172, 204, 69, 21));
     startupCheckbox.setText("Open file");
@@ -317,6 +379,18 @@ public class GPreferences extends JPanel
     browserLabel.setText("Default Browser (Unix)");
     defaultBrowser.setFont(verdana11);
     defaultBrowser.setText("");
+    usagestats.setText("Send usage statistics");
+    usagestats.setFont(verdana11);
+    usagestats.setHorizontalAlignment(SwingConstants.RIGHT);
+    usagestats.setHorizontalTextPosition(SwingConstants.LEADING);
+    questionnaire.setText("Check for questionnaires");
+    questionnaire.setFont(verdana11);
+    questionnaire.setHorizontalAlignment(SwingConstants.RIGHT);
+    questionnaire.setHorizontalTextPosition(SwingConstants.LEADING);
+    versioncheck.setText("Check for latest version");
+    versioncheck.setFont(verdana11);
+    versioncheck.setHorizontalAlignment(SwingConstants.RIGHT);
+    versioncheck.setHorizontalTextPosition(SwingConstants.LEADING);
     newLink.setText("New");
     newLink.addActionListener(new java.awt.event.ActionListener()
     {
@@ -401,8 +475,10 @@ public class GPreferences extends JPanel
     sortLabel.setText("Sort by ");
     jPanel2.setBounds(new Rectangle(7, 17, 158, 278));
     jPanel2.setLayout(gridLayout2);
-    gridLayout2.setRows(12);
+    gridLayout2.setRows(13);
     jPanel3.setBounds(new Rectangle(173, 35, 274, 26));
+    autoAnnotSettings1.setBounds(new Rectangle(173,53,274,26));// new Rectangle(173, 116, 274, 78));
+    autoAnnotSettings2.setBounds(new Rectangle(173,72,274,26));
     exportTab.setLayout(null);
     epsLabel.setFont(verdana11);
     epsLabel.setHorizontalAlignment(SwingConstants.RIGHT);
@@ -484,6 +560,7 @@ public class GPreferences extends JPanel
     jPanel2.add(seqLimit);
     jPanel2.add(rightAlign);
     jPanel2.add(fontLabel);
+    jPanel2.add(showUnconserved);
     jPanel2.add(idItalics);
     jPanel2.add(smoothFont);
     jPanel2.add(wrap);
@@ -500,10 +577,21 @@ public class GPreferences extends JPanel
     visualTab.add(fontNameCB);
     visualTab.add(fontSizeCB);
     visualTab.add(fontStyleCB);
+    visualTab.add(autoAnnotSettings1);
+    visualTab.add(autoAnnotSettings2);
     jPanel3.add(conservation);
     jPanel3.add(identity);
     jPanel3.add(quality);
+    autoAnnotSettings1.setLayout(new FlowLayout());
+    autoAnnotSettings2.setLayout(new FlowLayout());
+    autoAnnotSettings1.add(showConsensbits);
+    autoAnnotSettings1.add(showConsensHistogram);
+    autoAnnotSettings1.add(showConsensProfile);
+    autoAnnotSettings2.add(showGroupbits);
+    autoAnnotSettings2.add(showGroupConsensus);
+    autoAnnotSettings2.add(showGroupConservation);
     visualTab.add(jPanel2);
+
     linkPanel.add(editLinkButtons, BorderLayout.EAST);
     editLinkButtons.add(newLink, null);
     editLinkButtons.add(editLink, null);
@@ -541,7 +629,16 @@ public class GPreferences extends JPanel
     connectTab.add(defaultBrowser, new GridBagConstraints(1, 1, 1, 1, 1.0,
             0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
             new Insets(15, 0, 0, 15), 307, 1));
-
+    connectTab.add(usagestats, new GridBagConstraints(0, 4, 1, 1, 1.0,
+            0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
+            new Insets(0, 2, 4,2), 70, 1));
+    connectTab.add(questionnaire, new GridBagConstraints(1, 4, 1, 1, 1.0,
+            0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
+            new Insets(0, 2, 4,2), 70, 1));
+    connectTab.add(versioncheck, new GridBagConstraints(0, 5, 1, 1, 1.0,
+            0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL,
+            new Insets(0, 2, 4,2), 70, 1));
+    
     jPanel1.add(useProxy, new GridBagConstraints(0, 0, 2, 1, 0.0, 0.0,
             GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0,
                     2, 5, 185), 2, -4));
@@ -571,6 +668,12 @@ public class GPreferences extends JPanel
     exportTab.add(jPanel11);
   }
 
+  protected void showunconserved_actionPerformed(ActionEvent e)
+  {
+    // TODO Auto-generated method stub
+    
+  }
+
   /**
    * DOCUMENT ME!
    *