X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FFeatureSettings.java;h=15f3e5bce42950084bf4dd97fdb66dc7e6ed5eb1;hb=8546ee20c998cd48567d324027d1885a771e688f;hp=742ff8d3b43480e76e449a149a4b98131bb7b80c;hpb=eb712aa29e2bc62c57b90df8420052293dd90c6b;p=jalview.git diff --git a/src/jalview/gui/FeatureSettings.java b/src/jalview/gui/FeatureSettings.java index 742ff8d..15f3e5b 100644 --- a/src/jalview/gui/FeatureSettings.java +++ b/src/jalview/gui/FeatureSettings.java @@ -174,7 +174,7 @@ public class FeatureSettings extends JPanel implements public void mousePressed(MouseEvent evt) { selectedRow = table.rowAtPoint(evt.getPoint()); - if (SwingUtilities.isRightMouseButton(evt)) + if (evt.isPopupTrigger()) { popupSort(selectedRow, (String) table.getValueAt(selectedRow, 0), table.getValueAt(selectedRow, 1), fr.getMinMax(), @@ -183,16 +183,15 @@ public class FeatureSettings extends JPanel implements else if (evt.getClickCount() == 2) { boolean invertSelection = evt.isAltDown(); - boolean ctrlDown = Platform.isControlDown(evt); - boolean toggleSelection = ctrlDown; - boolean extendSelection = evt.isShiftDown() || ctrlDown; + boolean toggleSelection = Platform.isControlDown(evt); + boolean extendSelection = evt.isShiftDown(); fr.ap.alignFrame.avc.markColumnsContainingFeatures( invertSelection, extendSelection, toggleSelection, (String) table.getValueAt(selectedRow, 0)); } } - // 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());