/** Create a popup menu when mouse click */
 private void createPopupMenu(int x, int y) {
   Action[] popupMenuActions = getPopupMenuActions();
   JScrollBar vbar = getTreeTable().getVerticalScrollBar();
   myUIFacade.showPopupMenu(
       this,
       popupMenuActions,
       x
           - getTreeTable().getHorizontalScrollBar().getValue()
           + (vbar.isVisible() ? vbar.getWidth() : 0),
       y - vbar.getValue() + getTreeTable().getTable().getTableHeader().getHeight());
 }
Exemple #2
0
  /**
   * Scroll the vertical or horizontal scroll bar, if possible, using the given increment.
   *
   * @param increment The increment to apply on the vertical scroll bar.
   * @param vertical True: the vertical scroll bar is
   * @since 0.1
   */
  protected void scroll(final int increment, final boolean vertical) {
    final JScrollBar scrollbar = getScrollbar(vertical);

    if (scrollbar != null && scrollbar.isVisible())
      scrollbar.setValue(scrollbar.getValue() - increment);
  }