From e33b171845992fd21094ba754498f9ab3d29f110 Mon Sep 17 00:00:00 2001 From: jprocter Date: Sat, 1 Sep 2012 13:08:59 +0100 Subject: [PATCH] JAL-1160 support horizontal mouse wheel scrolling events --- src/jalview/gui/IdPanel.java | 15 +++++++++++++-- src/jalview/gui/SeqPanel.java | 15 +++++++++++++-- 2 files changed, 26 insertions(+), 4 deletions(-) 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. } -- 1.7.10.2