Ejemplo n.º 1
0
 @Override
 public void onBrowserEvent(Event event) {
   switch (Event.getCurrentEvent().getTypeInt()) {
     case Event.ONCLICK:
       gotClick = true;
       break;
     case Event.ONKEYPRESS:
       gotKeyPress = true;
       break;
     case Event.ONFOCUS:
       gotFocus = true;
       break;
   }
 }
Ejemplo n.º 2
0
 @Override
 public boolean onBrowserEvent(
     Cell.Context context,
     Element parent,
     C value,
     NativeEvent event,
     ValueUpdater<C> cValueUpdater) {
   resizer = cell.getResizeElement().cast();
   if (event.getEventTarget().equals(resizer)) {
     String eventType = event.getType();
     if (BrowserEvents.MOUSEDOWN.equals(eventType)) {
       startPosition = positionController.getPosition(Event.getCurrentEvent());
       int events =
           Event.getTypeInt(BrowserEvents.MOUSEMOVE) | Event.getTypeInt(BrowserEvents.MOUSEUP);
       DOM.setEventListener(resizer, eventListener);
       DOM.sinkEvents(resizer, events);
       DOM.setCapture(resizer);
       startSize = cell.getSize(parent);
       event.preventDefault();
       return true;
     }
   }
   return false;
 }
Ejemplo n.º 3
0
 @Override
 public void onClick(ClickEvent event) {
   setActive(!isActive());
   // re-fire the event with this as the source
   DomEvent.fireNativeEvent(Event.getCurrentEvent(), this);
 }