renderer = new AnnotationRenderer();
}
+ /**
+ * Responds to a mouse wheel movement by scrolling the annotations up or down.
+ * Annotation labels are scrolled via method adjustmentValueChanged when the
+ * vertical scrollbar is adjusted.
+ * <p>
+ * If shift is pressed, then scrolling is left or right instead, and is
+ * delegated to AlignmentPanel, so that both sequences and annotations are
+ * scrolled together.
+ * <p>
+ * This object is a MouseWheelListener to AnnotationLabels, so mouse wheel
+ * events over the labels are delegated to this method.
+ * <p>
+ * Note that this method may also be fired by scrolling with a gesture on a
+ * trackpad.
+ */
@Override
public void mouseWheelMoved(MouseWheelEvent e)
{
if (e.isShiftDown())
{
- e.consume();
- double wheelRotation = e.getPreciseWheelRotation();
- if (wheelRotation > 0)
- {
- av.getRanges().scrollRight(true);
- }
- else if (wheelRotation < 0)
- {
- av.getRanges().scrollRight(false);
- }
+ ap.getSeqPanel().mouseWheelMoved(e);
}
else
{