예제 #1
0
 public void handleEvent(GridEvent<Rule> be) {
   for (int i = 0; i < be.getGrid().getStore().getCount(); i++) {
     final Widget wid = be.getGrid().getView().getWidget(i, be.getColIndex());
     if ((wid != null) && (wid instanceof BoxComponent)) {
       ((BoxComponent) wid).setWidth(be.getWidth() - offset);
     }
   }
 }
예제 #2
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()));
   }
 }
예제 #3
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);
     }
   }
 }