From: gmungoc Date: Thu, 28 Jun 2018 15:49:10 +0000 (+0100) Subject: JAL-3032 avoid use of lambda expression or BasicArrowButton X-Git-Tag: Release_2_11_4_0~45^2~18^2~615^2~1 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=0b0d8f48a1dc4e18bfa4d1a03f017ec3253e3247;p=jalview.git JAL-3032 avoid use of lambda expression or BasicArrowButton --- diff --git a/src/jalview/gui/FeatureTypeSettings.java b/src/jalview/gui/FeatureTypeSettings.java index e13f6ee..b973708 100644 --- a/src/jalview/gui/FeatureTypeSettings.java +++ b/src/jalview/gui/FeatureTypeSettings.java @@ -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()