ProfilerScrollbar extends JBScrollBar { @VisibleForTesting public double getPanWheelDelta() { return myTimeline.getViewRange().getLength() * VIEW_PAN_PERCENTAGE_PER_MOUSEHWEEL_FACTOR; } ProfilerScrollbar(@NotNull StreamingTimeline timeline,
                           @NotNull JComponent zoomPanComponent); @VisibleForTesting double getZoomWheelDelta(); @VisibleForTesting double getPanWheelDelta(); @VisibleForTesting boolean isScrollable();  }
@Test public void testPan() { double delta = myScrollbar.getPanWheelDelta(); myUi.mouse.wheel(50, 50, 1); assertEquals(0 + delta, myTimeline.getViewRange().getMin(), EPSILON); assertEquals(5000 + delta, myTimeline.getViewRange().getMax(), EPSILON); myUi.mouse.wheel(50, 50, 2); assertEquals(0 + delta * 3, myTimeline.getViewRange().getMin(), EPSILON); assertEquals(5000 + delta * 3, myTimeline.getViewRange().getMax(), EPSILON); myUi.mouse.wheel(50, 50, -3); assertEquals(0, myTimeline.getViewRange().getMin(), EPSILON); assertEquals(5000, myTimeline.getViewRange().getMax(), EPSILON); }