Merge branch 'test_paolo_JAL-1065' into Tcoffee_JAL-1065
[jalview.git] / src / jalview / jbgui / GPreferences.java
index 6cad0b5..29e11ce 100755 (executable)
@@ -160,6 +160,11 @@ public class GPreferences extends JPanel
   JLabel epsLabel = new JLabel();
 
   protected JComboBox epsRendering = new JComboBox();
+  
+  protected JLabel userIdWidthlabel = new JLabel();
+  protected JCheckBox autoIdWidth = new JCheckBox();
+  protected JTextField userIdWidth = new JTextField();
+
 
   JLabel jLabel1 = new JLabel();
 
@@ -635,9 +640,45 @@ public class GPreferences extends JPanel
     sortByTree.setText("Sort With New Tree");
     sortByTree.setToolTipText("When selected, any trees calculated or loaded onto the alignment will automatically sort the alignment.");
     sortByTree.setBounds(new Rectangle(22, 136, 168, 23));
+    
+    autoIdWidth.setFont(JvSwingUtils.getLabelFont());
+    autoIdWidth.setText("Automatically set ID width");
+    autoIdWidth.setToolTipText("<html>"+JvSwingUtils.wrapTooltip("Adjusts the width of the generated EPS or PNG file to ensure even the longest sequence ID or annotation label is displayed")+"</html>");
+    autoIdWidth.setBounds(new Rectangle(228, 96,188,23));
+    autoIdWidth.addActionListener(new ActionListener()
+    {
+      
+      @Override
+      public void actionPerformed(ActionEvent e)
+      {
+        autoIdWidth_actionPerformed();
+      }
+    });
+    userIdWidthlabel.setFont(JvSwingUtils.getLabelFont());
+    userIdWidthlabel.setText("Figure ID column width");
+    userIdWidth
+            .setToolTipText("<html>"+JvSwingUtils
+                    .wrapTooltip("Manually specify the width of the left hand column where sequence IDs and annotation labels will be rendered in exported alignment figures. This setting will be ignored if 'Automatically set ID width' is set")+"</html>");
+    userIdWidthlabel
+            .setToolTipText("<html>"+JvSwingUtils
+                    .wrapTooltip("Manually specify the width of the left hand column where sequence IDs and annotation labels will be rendered in exported alignment figures. This setting will be ignored if 'Automatically set ID width' is set")+"</html>");
+    userIdWidthlabel.setBounds(new Rectangle(236, 120,168,23));
+    userIdWidth.setFont(JvSwingUtils.getTextAreaFont());
+    userIdWidth.setText("");
+    userIdWidth.setBounds(new Rectangle(232,144,84,23));
+    userIdWidth.addActionListener(new ActionListener()
+    {
+      
+      @Override
+      public void actionPerformed(ActionEvent e)
+      {
+        userIdWidth_actionPerformed();
+      }
+    });
     modellerOutput.setFont(JvSwingUtils.getLabelFont());
     modellerOutput.setText("Use Modeller Output");
     modellerOutput.setBounds(new Rectangle(228, 226, 168, 23));
+
     dasPanel.setLayout(borderLayout4);
     wsPanel.setLayout(borderLayout5);
     wrap.setFont(JvSwingUtils.getLabelFont());
@@ -793,6 +834,9 @@ public class GPreferences extends JPanel
     jPanel11.add(pfamjv);
     jPanel11.add(pileupjv);
     jPanel11.add(pirjv);
+    exportTab.add(autoIdWidth);
+    exportTab.add(userIdWidth);
+    exportTab.add(userIdWidthlabel);
     exportTab.add(modellerOutput);
     tabbedPane.add(calcTab, "Editing");
     calcTab.add(autoCalculateConsCheck);
@@ -807,6 +851,18 @@ public class GPreferences extends JPanel
     exportTab.add(jPanel11);
   }
 
+  protected void autoIdWidth_actionPerformed()
+  {
+    // TODO Auto-generated method stub
+    
+  }
+
+  protected void userIdWidth_actionPerformed()
+  {
+    // TODO Auto-generated method stub
+    
+  }
+
   protected void maxColour_actionPerformed()
   {
     // TODO Auto-generated method stub