From 0f1112504af863ac65e6f986546ad74785f3b4ab Mon Sep 17 00:00:00 2001 From: gmungoc Date: Mon, 19 Nov 2018 15:14:34 +0000 Subject: [PATCH] JAL-3032 J2S variant for painting JTable --- src/jalview/gui/FeatureSettings.java | 43 +++++++++++++++++----------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/src/jalview/gui/FeatureSettings.java b/src/jalview/gui/FeatureSettings.java index 6046a2e..3cd6c21 100644 --- a/src/jalview/gui/FeatureSettings.java +++ b/src/jalview/gui/FeatureSettings.java @@ -22,6 +22,7 @@ package jalview.gui; import jalview.api.FeatureColourI; import jalview.api.FeatureSettingsControllerI; +import jalview.bin.Jalview; import jalview.datamodel.AlignmentI; import jalview.datamodel.SequenceI; import jalview.datamodel.features.FeatureMatcher; @@ -1144,26 +1145,28 @@ public class FeatureSettings extends JPanel repaintTable(); } - - private void repaintTable() { - // BH 2018 - // Here is a needed intervention - // because generally we don't "repaint" - // the table. We re-create the HTML divs - // that is associated with it. A better - // way to do this would be to fire a property change. - - @SuppressWarnings("unused") - TableUI ui = table.getUI(); - /** - * @j2sNative ui.repaintTable$(); - */ - { - table.repaint(); - } + /** + * Repaints the table using alternative code for Java and J2S + */ + private void repaintTable() + { + // BH 2018 + // Here is a needed intervention + // because generally we don't "repaint" + // the table. We re-create the HTML divs + // that is associated with it. A better + // way to do this would be to fire a property change. + @SuppressWarnings("unused") + TableUI ui = table.getUI(); + /** + * @j2sNative ui.repaintTable$(); + */ + { + table.repaint(); } + } -public void close() + public void close() { try { @@ -1752,9 +1755,7 @@ public void close() * variable colour and filters dialog */ chooser = new FeatureTypeSettings(me.fr, type); - /** - * @j2sNative - */ + if (!Jalview.isJS()) { chooser.setRequestFocusEnabled(true); chooser.requestFocus(); -- 1.7.10.2