JAL-3032 avoid use of lambda expression or BasicArrowButton
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 28 Jun 2018 15:49:10 +0000 (16:49 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 28 Jun 2018 15:49:10 +0000 (16:49 +0100)
src/jalview/gui/FeatureTypeSettings.java

index e13f6ee..b973708 100644 (file)
@@ -64,11 +64,9 @@ import javax.swing.JRadioButton;
 import javax.swing.JSlider;
 import javax.swing.JTabbedPane;
 import javax.swing.JTextField;
-import javax.swing.SwingConstants;
 import javax.swing.border.LineBorder;
 import javax.swing.event.ChangeEvent;
 import javax.swing.event.ChangeListener;
-import javax.swing.plaf.basic.BasicArrowButton;
 
 /**
  * A dialog where the user can configure colour scheme, and any filters, for one
@@ -1242,7 +1240,12 @@ public class FeatureTypeSettings extends JalviewDialog
       {
         orFilters.setSelected(true);
       }
-      featureFilters.getMatchers().forEach(matcher -> filters.add(matcher));
+      // avoid use of lambda expression to keep SwingJS happy
+      // featureFilters.getMatchers().forEach(item -> filters.add(item));
+      for (FeatureMatcherI matcher : featureFilters.getMatchers())
+      {
+        filters.add(matcher);
+      }
     }
 
     /*
@@ -1422,8 +1425,8 @@ public class FeatureTypeSettings extends JalviewDialog
     if (!patternField.isEnabled()
             || (pattern != null && pattern.trim().length() > 0))
     {
-      // todo: gif for button drawing '-' or 'x'
-      JButton removeCondition = new BasicArrowButton(SwingConstants.WEST);
+      JButton removeCondition = new JButton("\u2717"); // Dingbats cursive x
+      removeCondition.setPreferredSize(new Dimension(23, 17));
       removeCondition
               .setToolTipText(MessageManager.getString("label.delete_row"));
       removeCondition.addActionListener(new ActionListener()