コード例 #1
0
  /**
   * Cancels automatic block scrolling.
   *
   * @param component The scroll bar.
   * @param button The button that was released.
   * @param x The x-coordinate of the event in the scroll bar's coordinate space.
   * @param y The y-coordinate of the event in the scroll bar's coordinate space.
   */
  @Override
  public boolean mouseUp(Component component, Mouse.Button button, int x, int y) {
    boolean consumed = super.mouseUp(component, button, x, y);

    if (button == Mouse.Button.LEFT) {
      automaticScroller.stop();
    }

    return consumed;
  }
コード例 #2
0
  @Override
  public void mouseOut(Component component) {
    super.mouseOut(component);

    automaticScroller.stop();
  }