X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FFeatureSettings.java;h=15f3e5bce42950084bf4dd97fdb66dc7e6ed5eb1;hb=ee5718cb9339243dd47eeb410fe101217859c2ff;hp=3b8ce3715d92e146c9f117a792138ec821cc60f0;hpb=3828a47f3ee9549412e04d91cbc1455cada45d01;p=jalview.git diff --git a/src/jalview/gui/FeatureSettings.java b/src/jalview/gui/FeatureSettings.java index 3b8ce37..15f3e5b 100644 --- a/src/jalview/gui/FeatureSettings.java +++ b/src/jalview/gui/FeatureSettings.java @@ -174,8 +174,7 @@ public class FeatureSettings extends JPanel implements public void mousePressed(MouseEvent evt) { selectedRow = table.rowAtPoint(evt.getPoint()); - boolean ctrlDown = Platform.isControlDown(evt); - if (SwingUtilities.isRightMouseButton(evt) && !ctrlDown) + if (evt.isPopupTrigger()) { popupSort(selectedRow, (String) table.getValueAt(selectedRow, 0), table.getValueAt(selectedRow, 1), fr.getMinMax(), @@ -184,7 +183,7 @@ public class FeatureSettings extends JPanel implements else if (evt.getClickCount() == 2) { boolean invertSelection = evt.isAltDown(); - boolean toggleSelection = ctrlDown; + boolean toggleSelection = Platform.isControlDown(evt); boolean extendSelection = evt.isShiftDown(); fr.ap.alignFrame.avc.markColumnsContainingFeatures( invertSelection, extendSelection, toggleSelection, @@ -192,7 +191,7 @@ public class FeatureSettings extends JPanel implements } } - // isPopupTrigger fires on mouseReleased on Mac + // isPopupTrigger fires on mouseReleased on Windows @Override public void mouseReleased(MouseEvent evt) { @@ -819,8 +818,8 @@ public class FeatureSettings extends JPanel implements } else { - Color color = new Color( - Integer.parseInt(jucs.getColour(i).getRGB(), 16)); + Color color = new Color(Integer.parseInt(jucs.getColour(i) + .getRGB(), 16)); fr.setColour(name = jucs.getColour(i).getName(), new FeatureColour(color)); } @@ -845,8 +844,7 @@ public class FeatureSettings extends JPanel implements void save() { JalviewFileChooser chooser = new JalviewFileChooser( - Cache.getProperty("LAST_DIRECTORY"), - new String[] { "fc" }, + Cache.getProperty("LAST_DIRECTORY"), new String[] { "fc" }, new String[] { "Sequence Feature Colours" }, "Sequence Feature Colours"); chooser.setFileView(new jalview.io.JalviewFileView());