JAL-3949 Complete new abstracted logging framework in jalview.log. Updated log calls...
[jalview.git] / src / jalview / jbgui / GPreferences.java
index 2c6eb32..f7d9860 100755 (executable)
@@ -179,8 +179,6 @@ public class GPreferences extends JPanel
 
   protected JCheckBox structFromPdb = new JCheckBox();
 
-  protected JCheckBox useRnaView = new JCheckBox();
-
   protected JCheckBox addSecondaryStructure = new JCheckBox();
 
   protected JCheckBox addTempFactor = new JCheckBox();
@@ -541,9 +539,12 @@ public class GPreferences extends JPanel
     }
   }
 
-  public final static int CONNECTIONS_TAB = 5;
+  public static enum TabRef
+  {
+    CONNECTIONS_TAB, STRUCTURE_TAB
+  };
 
-  public void selectTab(int selectTab)
+  public void selectTab(TabRef selectTab)
   {
     // select a given tab - currently only for Connections
     switch (selectTab)
@@ -551,6 +552,9 @@ public class GPreferences extends JPanel
     case CONNECTIONS_TAB:
       tabbedPane.setSelectedComponent(connectTab);
       break;
+    case STRUCTURE_TAB:
+      tabbedPane.setSelectedComponent(structureTab);
+      break;
     default:
     }
   }
@@ -1677,7 +1681,6 @@ public class GPreferences extends JPanel
       {
         boolean selected = structFromPdb.isSelected();
         // enable other options only when the first is checked
-        useRnaView.setEnabled(selected);
         addSecondaryStructure.setEnabled(selected);
         addTempFactor.setEnabled(selected);
       }
@@ -1686,12 +1689,6 @@ public class GPreferences extends JPanel
 
     // indent checkboxes that are conditional on the first one
     ypos += lineSpacing;
-    useRnaView.setFont(LABEL_FONT);
-    useRnaView.setText(MessageManager.getString("label.use_rnaview"));
-    useRnaView.setBounds(new Rectangle(25, ypos, width, height));
-    structureTab.add(useRnaView);
-
-    ypos += lineSpacing;
     addSecondaryStructure.setFont(LABEL_FONT);
     addSecondaryStructure
             .setText(MessageManager.getString("label.autoadd_secstr"));
@@ -1820,8 +1817,8 @@ public class GPreferences extends JPanel
   }
 
   /**
-   * Show a dialog for the user to choose a file. Returns the chosen path, or
-   * null on Cancel.
+   * Show a dialog for the user to choose a file. Returns the chosen path, or null
+   * on Cancel.
    * 
    * @return
    */
@@ -2796,7 +2793,7 @@ public class GPreferences extends JPanel
     }
     else
     {
-      Cache.log.error(
+      Cache.error(
               "Preset '" + value + "' [key:" + key + "] not implemented");
     }
 
@@ -2816,7 +2813,7 @@ public class GPreferences extends JPanel
               .getSelectedItem();
     } catch (Exception ex)
     {
-      Cache.log.error(
+      Cache.error(
               "Problem casting Combo entry to IntKeyStringValueEntry.");
       e = null;
     }
@@ -2834,7 +2831,7 @@ public class GPreferences extends JPanel
         e = (IntKeyStringValueEntry) backupfilesPresetsCombo2.getItemAt(i);
       } catch (Exception ex)
       {
-        Cache.log.error(
+        Cache.error(
                 "Problem casting Combo entry to IntKeyStringValueEntry. Skipping item. ");
         continue;
       }
@@ -3282,7 +3279,7 @@ public class GPreferences extends JPanel
         i = ((Integer) s.getValue()).intValue();
       } catch (Exception e)
       {
-        Cache.log.error(
+        Cache.error(
                 "Exception casting the initial value of s.getValue()");
       }
     }
@@ -3318,7 +3315,7 @@ public class GPreferences extends JPanel
       i = (Integer) s.getValue();
     } catch (Exception e)
     {
-      Cache.log.error("Failed casting (Integer) JSpinner s.getValue()");
+      Cache.error("Failed casting (Integer) JSpinner s.getValue()");
     }
     return i;
   }
@@ -3489,7 +3486,7 @@ public class GPreferences extends JPanel
    * DOCUMENT ME!
    * 
    * @param e
-   *          DOCUMENT ME!
+   *            DOCUMENT ME!
    */
   public void ok_actionPerformed(ActionEvent e)
   {
@@ -3499,7 +3496,7 @@ public class GPreferences extends JPanel
    * DOCUMENT ME!
    * 
    * @param e
-   *          DOCUMENT ME!
+   *            DOCUMENT ME!
    */
   public void cancel_actionPerformed(ActionEvent e)
   {
@@ -3509,7 +3506,7 @@ public class GPreferences extends JPanel
    * DOCUMENT ME!
    * 
    * @param e
-   *          DOCUMENT ME!
+   *            DOCUMENT ME!
    */
   public void annotations_actionPerformed(ActionEvent e)
   {