From: hansonr Date: Sun, 18 Nov 2018 06:02:15 +0000 (-0600) Subject: BH - suggestion to turn off column dragging in Java (and JavaScript) X-Git-Tag: Release_2_11_4_0~45^2~18^2~387 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=58922b9dd9afcf0c284834dd160a08703450f701;p=jalview.git BH - suggestion to turn off column dragging in Java (and JavaScript) --- diff --git a/src/jalview/gui/FeatureSettings.java b/src/jalview/gui/FeatureSettings.java index 4f3d7b9..7b708ab 100644 --- a/src/jalview/gui/FeatureSettings.java +++ b/src/jalview/gui/FeatureSettings.java @@ -98,6 +98,7 @@ import javax.swing.ToolTipManager; import javax.swing.border.Border; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; +import javax.swing.plaf.TableUI; import javax.swing.table.AbstractTableModel; import javax.swing.table.TableCellEditor; import javax.swing.table.TableCellRenderer; @@ -239,6 +240,7 @@ public class FeatureSettings extends JPanel return tip; } + /** * Position the tooltip near the bottom edge of, and half way across, the @@ -255,6 +257,12 @@ public class FeatureSettings extends JPanel return loc; } }; + + // next line is needed to avoid (quiet) exceptions thrown + // when column ordering changes so that the above constants + // no longer apply. + table.getTableHeader().setReorderingAllowed(false); // BH 2018 + table.getTableHeader().setFont(new Font("Verdana", Font.PLAIN, 12)); ToolTipManager.sharedInstance().registerComponent(table);