From: jprocter Date: Sat, 1 Sep 2012 12:08:59 +0000 (+0100) Subject: JAL-1160 support horizontal mouse wheel scrolling events X-Git-Tag: Jalview_2_9~361 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=e33b171845992fd21094ba754498f9ab3d29f110;p=jalview.git JAL-1160 support horizontal mouse wheel scrolling events --- diff --git a/src/jalview/gui/IdPanel.java b/src/jalview/gui/IdPanel.java index 3b9d385..a42251e 100755 --- a/src/jalview/gui/IdPanel.java +++ b/src/jalview/gui/IdPanel.java @@ -132,11 +132,22 @@ public class IdPanel extends JPanel implements MouseListener, e.consume(); if (e.getWheelRotation() > 0) { - alignPanel.scrollUp(false); + if (e.isShiftDown()) + { + alignPanel.scrollRight(true); + + } else { + alignPanel.scrollUp(false); + } } else { - alignPanel.scrollUp(true); + if (e.isShiftDown()) + { + alignPanel.scrollRight(false); + } else { + alignPanel.scrollUp(true); + } } } diff --git a/src/jalview/gui/SeqPanel.java b/src/jalview/gui/SeqPanel.java index 648c3a2..4fac4fc 100644 --- a/src/jalview/gui/SeqPanel.java +++ b/src/jalview/gui/SeqPanel.java @@ -1375,11 +1375,22 @@ public class SeqPanel extends JPanel implements MouseListener, e.consume(); if (e.getWheelRotation() > 0) { - ap.scrollUp(false); + if (e.isShiftDown()) + { + ap.scrollRight(true); + + } else { + ap.scrollUp(false); + } } else { - ap.scrollUp(true); + if (e.isShiftDown()) + { + ap.scrollRight(false); + } else { + ap.scrollUp(true); + } } // TODO Update tooltip for new position. }