JAL-3551 working proof of concept of Jalview driving PyMOL
[jalview.git] / src / jalview / jbgui / GPreferences.java
index 6c46f43..f2761dd 100755 (executable)
@@ -179,9 +179,9 @@ public class GPreferences extends JPanel
 
   protected JComboBox<String> structViewer = new JComboBox<>();
 
-  protected JLabel chimeraPathLabel;
+  protected JLabel structureViewerPathLabel;
 
-  protected JTextField chimeraPath = new JTextField();
+  protected JTextField structureViewerPath = new JTextField();
 
   protected ButtonGroup mappingMethod = new ButtonGroup();
 
@@ -1253,6 +1253,7 @@ public class GPreferences extends JPanel
     structViewer.addItem(ViewerType.JMOL.name());
     structViewer.addItem(ViewerType.CHIMERA.name());
     structViewer.addItem(ViewerType.CHIMERAX.name());
+    structViewer.addItem(ViewerType.PYMOL.name());
     structViewer.addActionListener(new ActionListener()
     {
       @Override
@@ -1265,38 +1266,38 @@ public class GPreferences extends JPanel
     structureTab.add(structViewer);
 
     ypos += lineSpacing;
-    chimeraPathLabel = new JLabel();
-    chimeraPathLabel.setFont(LABEL_FONT);// new Font("SansSerif", 0, 11));
-    chimeraPathLabel.setHorizontalAlignment(SwingConstants.LEFT);
-    chimeraPathLabel.setText(MessageManager
+    structureViewerPathLabel = new JLabel();
+    structureViewerPathLabel.setFont(LABEL_FONT);// new Font("SansSerif", 0, 11));
+    structureViewerPathLabel.setHorizontalAlignment(SwingConstants.LEFT);
+    structureViewerPathLabel.setText(MessageManager
             .formatMessage("label.chimera_path", "Chimera(X)"));
-    chimeraPathLabel.setBounds(new Rectangle(10, ypos, 170, height));
-    chimeraPathLabel.setEnabled(false);
-    structureTab.add(chimeraPathLabel);
+    structureViewerPathLabel.setBounds(new Rectangle(10, ypos, 170, height));
+    structureViewerPathLabel.setEnabled(false);
+    structureTab.add(structureViewerPathLabel);
 
-    chimeraPath.setFont(LABEL_FONT);
-    chimeraPath.setText("");
-    chimeraPath.setEnabled(false);
+    structureViewerPath.setFont(LABEL_FONT);
+    structureViewerPath.setText("");
+    structureViewerPath.setEnabled(false);
     final String tooltip = JvSwingUtils.wrapTooltip(true,
             MessageManager.getString("label.chimera_path_tip"));
-    chimeraPath.setToolTipText(tooltip);
-    chimeraPath.setBounds(new Rectangle(190, ypos, 290, height));
-    chimeraPath.addMouseListener(new MouseAdapter()
+    structureViewerPath.setToolTipText(tooltip);
+    structureViewerPath.setBounds(new Rectangle(190, ypos, 290, height));
+    structureViewerPath.addMouseListener(new MouseAdapter()
     {
       @Override
       public void mouseClicked(MouseEvent e)
       {
-        if (chimeraPath.isEnabled() && e.getClickCount() == 2)
+        if (structureViewerPath.isEnabled() && e.getClickCount() == 2)
         {
           String chosen = openFileChooser();
           if (chosen != null)
           {
-            chimeraPath.setText(chosen);
+            structureViewerPath.setText(chosen);
           }
         }
       }
     });
-    structureTab.add(chimeraPath);
+    structureTab.add(structureViewerPath);
 
     ypos += lineSpacing;
     nwMapping.setFont(LABEL_FONT);