int keyCode = getUberEvent().key.getKeyCode();
// We only want to respond to up, down, left and right keys.
if (keyCode != KeyEvent.VK_UP && keyCode != KeyEvent.VK_DOWN &&
keyCode != KeyEvent.VK_LEFT && keyCode != KeyEvent.VK_RIGHT)
return new NullProcessor();
// If there's no tree, we can't do anything either.
if (tree == null)
return new NullProcessor();
TreeProcessor proc = new TreeProcessor();
proc.setKeyEvent(true);
proc.setKeyCode(keyCode);
proc.setTree(tree);