X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FFeatureSettings.java;h=d65016edd53875582e7e46dbd3346e18b6cc3d10;hb=483e7163b1fb8d4bcb9393014816c944befce328;hp=3b8ce3715d92e146c9f117a792138ec821cc60f0;hpb=3828a47f3ee9549412e04d91cbc1455cada45d01;p=jalview.git diff --git a/src/jalview/gui/FeatureSettings.java b/src/jalview/gui/FeatureSettings.java index 3b8ce37..d65016e 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) { @@ -750,10 +749,8 @@ public class FeatureSettings extends JPanel implements void load() { JalviewFileChooser chooser = new JalviewFileChooser( - jalview.bin.Cache.getProperty("LAST_DIRECTORY"), - new String[] { "fc" }, - new String[] { "Sequence Feature Colours" }, - "Sequence Feature Colours"); + Cache.getProperty("LAST_DIRECTORY"), "fc", + "Sequence Feature Colours", "Sequence Feature Colours"); chooser.setFileView(new jalview.io.JalviewFileView()); chooser.setDialogTitle(MessageManager .getString("label.load_feature_colours")); @@ -845,10 +842,8 @@ public class FeatureSettings extends JPanel implements void save() { JalviewFileChooser chooser = new JalviewFileChooser( - Cache.getProperty("LAST_DIRECTORY"), - new String[] { "fc" }, - new String[] { "Sequence Feature Colours" }, - "Sequence Feature Colours"); + Cache.getProperty("LAST_DIRECTORY"), "fc", + "Sequence Feature Colours", "Sequence Feature Colours"); chooser.setFileView(new jalview.io.JalviewFileView()); chooser.setDialogTitle(MessageManager .getString("label.save_feature_colours")); @@ -1404,15 +1399,15 @@ public class FeatureSettings extends JPanel implements public void noDasSourceActive() { complete(); - JOptionPane + JvOptionPane .showInternalConfirmDialog( Desktop.desktop, MessageManager .getString("label.no_das_sources_selected_warn"), MessageManager .getString("label.no_das_sources_selected_title"), - JOptionPane.DEFAULT_OPTION, - JOptionPane.INFORMATION_MESSAGE); + JvOptionPane.DEFAULT_OPTION, + JvOptionPane.INFORMATION_MESSAGE); } // ///////////////////////////////////////////////////////////////////////