Пример #1
0
 protected void onScrollerIn(El t) {
   boolean top = t.is(".x-menu-scroller-top");
   if (top
       ? ul.getScrollTop() > 0
       : ul.getScrollTop() + activeMax < ul.dom.getPropertyInt("scrollHeight")) {
     t.addStyleName("x-menu-item-active", "x-menu-scroller-active");
   }
 }
Пример #2
0
 @SuppressWarnings("rawtypes")
 @Override
 public void handleComponentEvent(GridEvent ge) {
   super.handleComponentEvent(ge);
   int type = ge.getEventTypeInt();
   Element target = ge.getTarget();
   if (!ignoreScroll && (type == Event.ONSCROLL && liveScroller.dom.isOrHasChild(target))
       || (type == Event.ONMOUSEWHEEL && mainBody.dom.isOrHasChild(target))) {
     ge.stopEvent();
     if (type == Event.ONMOUSEWHEEL) {
       int v = ge.getEvent().getMouseWheelVelocityY() * getCalculatedRowHeight();
       liveScroller.setScrollTop(liveScroller.getScrollTop() + v);
     } else {
       updateRows(
           (int) Math.ceil((double) liveScroller.getScrollTop() / getCalculatedRowHeight()),
           false);
     }
   }
 }
Пример #3
0
  protected void onScroll(ClickRepeaterEvent ce) {
    El target = ce.getEl();
    boolean top = target.is(".x-menu-scroller-top");
    scrollMenu(top);

    if (top
        ? ul.getScrollTop() <= 0
        : ul.getScrollTop() + activeMax >= ul.dom.getPropertyInt("scrollHeight")) {
      onScrollerOut(target);
    }
  }
Пример #4
0
 protected void scrollMenu(boolean top) {
   ul.setScrollTop(ul.getScrollTop() + scrollIncrement * (top ? -1 : 1));
 }
Пример #5
0
 @Override
 protected void notifyShow() {
   super.notifyShow();
   updateRows(
       (int) Math.ceil((double) liveScroller.getScrollTop() / getCalculatedRowHeight()), true);
 }