@Override public void onKeyUp(KeyUpEvent event) { if (event.getSource().equals(txtBuscar.textBox)) { grid.getDataProvider().setFilter(txtBuscar.getText()); grid.getDataProvider().refresh(); } else if (event.getSource().equals(grid)) { if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER || event.getNativeEvent().getKeyCode() == KeyCodes.KEY_SPACE) { itemSelected(); } } }
@Override public void onKeyUp(KeyUpEvent event) { switch (event.getNativeEvent().getKeyCode()) { case 38: /*up*/ case 87: /*W*/ this.moveForward = false; break; case 37: /*left*/ case 65: /*A*/ this.moveLeft = false; break; case 40: /*down*/ case 83: /*S*/ this.moveBackward = false; break; case 39: /*right*/ case 68: /*D*/ this.moveRight = false; break; case 82: /*R*/ this.moveUp = false; break; case 70: /*F*/ this.moveDown = false; break; } }
@UiHandler("filter") public void onFilterSelected(KeyUpEvent event) { if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER || filter.getTextBox().getText().isEmpty()) { // variables list has changed so update all getUiHandlers().filterVariables(filter.getTextBox().getText()); } }
@Override public void onKeyUp(KeyUpEvent event) { ignoreNextKeyPress = false; cancelNextKeyPress = false; Event nativeEvent = (Event) event.getNativeEvent(); if (!nativeEvent.isCancelled()) { handleKeyRelease(nativeEvent); } }
@Override public void onKeyUp(KeyUpEvent event) { if (isReadOnly() || !isEnabled()) { return; } if (processKeyCode(event.getNativeEvent().getKeyCode())) { cancelKey(); } }