JAL-2316 Restructure identifiers.org download
[jalview.git] / src / jalview / jbgui / GPreferences.java
index 3fe1939..6fe6be2 100755 (executable)
@@ -654,6 +654,12 @@ public class GPreferences extends JPanel
     linkUrlTable.setAutoCreateRowSorter(true);
     linkUrlTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
 
+    // adjust row height so radio buttons actually fit
+    // don't do this in the renderer, it causes the awt thread to activate
+    // constantly
+    JRadioButton temp = new JRadioButton();
+    linkUrlTable.setRowHeight(temp.getMinimumSize().height);
+
     // Table in scrollpane so that the table is given a scrollbar
     JScrollPane linkScrollPane = new JScrollPane(linkUrlTable);
     linkScrollPane.setBorder(null);
@@ -706,7 +712,7 @@ public class GPreferences extends JPanel
     filterTB.setFont(LABEL_FONT);
     filterTB.setText("");
 
-    doReset.setText(MessageManager.getString("action.reset"));
+    doReset.setText(MessageManager.getString("action.showall"));
     userOnly.setText(MessageManager.getString("action.customfilter"));
 
     // Panel for filter functionality
@@ -1515,54 +1521,51 @@ public class GPreferences extends JPanel
 
       // set colours to match rest of table
       if (isSelected)
-      {
-        setBackground(table.getSelectionBackground());
-        setForeground(table.getSelectionForeground());
-      }
-      else
-      {
-        setBackground(table.getBackground());
-        setForeground(table.getForeground());
+       {
+         setBackground(table.getSelectionBackground());
+         setForeground(table.getSelectionForeground());
+       }
+       else
+       {
+         setBackground(table.getBackground());
+         setForeground(table.getForeground());
       }
 
-      // adjust row height so radio buttons actually fit
-      table.setRowHeight(row, getMinimumSize().height);
-
       return this;
     }
   }
 
   public class RadioButtonEditor extends AbstractCellEditor implements
-          TableCellEditor
-  {
-    private JRadioButton button = new JRadioButton();
-
-    public RadioButtonEditor()
+            TableCellEditor
     {
-      this.button.setHorizontalAlignment(SwingConstants.CENTER);
-      this.button.addActionListener(new ActionListener()
+      private JRadioButton button = new JRadioButton();
+
+      public RadioButtonEditor()
       {
-        @Override
-        public void actionPerformed(ActionEvent e)
+        // this.button.setHorizontalAlignment(SwingConstants.CENTER);
+      this.button.addActionListener(new ActionListener()
         {
-          fireEditingStopped();
-        }
-      });
-    }
+          @Override
+          public void actionPerformed(ActionEvent e)
+          {
+            fireEditingStopped();
+          }
+        });
+      }
 
-    @Override
-    public Component getTableCellEditorComponent(JTable table,
-            Object value, boolean isSelected, int row, int column)
-    {
+      @Override
+      public Component getTableCellEditorComponent(JTable table,
+              Object value, boolean isSelected, int row, int column)
+      {
       button.setSelected((boolean) value);
-      return button;
-    }
+        return button;
+      }
 
-    @Override
-    public Object getCellEditorValue()
-    {
+      @Override
+      public Object getCellEditorValue()
+      {
       return button.isSelected();
-    }
+      }
 
   }
 }