@Override
 public HandlerRegistration addSelectionHandler(final SelectionHandler<EntitySuggestion> handler) {
   final HandlerRegistration handlerReg = addHandler(handler, SelectionEvent.getType());
   final HandlerRegistration delegateReg =
       delegate.addSelectionHandler(
           new SelectionHandler<SuggestOracle.Suggestion>() {
             @Override
             public void onSelection(SelectionEvent<SuggestOracle.Suggestion> event) {
               SuggestOracle.Suggestion suggestion = event.getSelectedItem();
               if (suggestion instanceof EntitySuggestion) {
                 SelectionEvent.fire(
                     PrimitiveDataEditorViewImpl.this, (EntitySuggestion) suggestion);
               }
             }
           });
   return new HandlerRegistration() {
     @Override
     public void removeHandler() {
       handlerReg.removeHandler();
       delegateReg.removeHandler();
     }
   };
 }
Example #2
0
 public HandlerRegistration addSelectionHandler(SelectionHandler<Integer> handler) {
   return addHandler(handler, SelectionEvent.getType());
 }
 @Override
 public HandlerRegistration addSelectionHandler(SelectionHandler<String> handler) {
   return addHandler(handler, SelectionEvent.getType());
 }
Example #4
0
 public HandlerRegistration addSelectionHandler(SelectionHandler<Appointment> handler) {
   return addHandler(handler, SelectionEvent.getType());
 }
 @Override
 public HandlerRegistration addSelectionHandler(
     SelectionHandler<Contact> contactSelectionHandler) {
   return addHandler(contactSelectionHandler, SelectionEvent.getType());
 }
 public HandlerRegistration addSelectionHandler(SelectionHandler<RowClass> handler) {
   return addHandler(handler, SelectionEvent.getType());
 }
Example #7
0
 public HandlerRegistration addSelectionHandler(SelectionHandler<Suggestion> handler) {
   return addHandler(handler, SelectionEvent.getType());
 }