From: gmungoc Date: Mon, 19 Nov 2018 15:14:34 +0000 (+0000) Subject: JAL-3032 J2S variant for painting JTable X-Git-Tag: Develop-2_11_2_0-d20201215~24^2~68^2~383^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=0f1112504af863ac65e6f986546ad74785f3b4ab;p=jalview.git JAL-3032 J2S variant for painting JTable --- 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();