예제 #1
0
 @Override
 protected void onMouseDown(GridEvent<ModelData> ge) {
   super.onMouseDown(ge);
   El hd = ge.getTarget(".x-grid-group-hd", 10);
   if (hd != null) {
     ge.stopEvent();
     toggleGroup(hd.dom.getParentElement(), isGroupExpanded(hd.dom.getParentElement()));
   }
 }
예제 #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);
     }
   }
 }