class ProfilerScrollbar extends JBScrollBar {

  @Override
  protected void paintComponent(Graphics g) {
    super.paintComponent(g);

    // Change back to streaming mode as needed
    // Note: isCloseToMax() checks for pixel proximity which relies on the scrollbar's dimension, which is why this code snippet
    // is here instead of animate/postAnimate - we wouldn't get the most current size in those places.
    if (myCheckStream) {
      if (!myTimeline.isStreaming() && isCloseToMax() && myTimeline.canStream()) {
        myTimeline.setStreaming(true);
      }
    }
    myCheckStream = false;
  }

  public  ProfilerScrollbar(@NotNull StreamingTimeline timeline,
                           @NotNull JComponent zoomPanComponent);

}