private void installKeyBindings(JComponent ui) {
Action action = new ClickAction();
KeyBindingInstaller inst = new KeyBindingInstaller(ui, JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
inst.addBinding(KeyUtils.SPACE, "space", action);
inst.addBinding(KeyUtils.ENTER, "enter", action);
inst.install();
}
private void installController(JComponent ui) {
final Controller ctrl = new Controller();
ComponentTraverser.traverse(ui, new Acceptor<Component>() {