Exemplo n.º 1
0
 private boolean onOk(EnvironmentEvent event) {
   if (clickHandler == null) return false;
   final int index = selectedIndex();
   final Object item = selected();
   if (index < 0 || item == null) return false;
   return clickHandler.onListClick(this, index, item);
 }
Exemplo n.º 2
0
 protected boolean onEnter(KeyboardEvent event) {
   if (isEmpty() || clickHandler == null) return false;
   if (selected() == null || selectedIndex() < 0) return false;
   return clickHandler.onListClick(this, selectedIndex(), selected());
 }