Example usage for com.vaadin.ui Window addShortcutListener

List of usage examples for com.vaadin.ui Window addShortcutListener

Introduction

In this page you can find the example usage for com.vaadin.ui Window addShortcutListener.

Prototype

public Registration addShortcutListener(ShortcutListener shortcut) 

Source Link

Usage

From source file:fr.amapj.view.engine.grid.ShortCutManager.java

License:Open Source License

public void addShorcut(Window w) {
    w.addShortcutListener(new ShortcutListenerImpl(KeyCode.ENTER, Key.ENTER));
    w.addShortcutListener(new ShortcutListenerImpl(107, Key.PLUS));

    w.addShortcutListener(new ShortcutListenerImpl(KeyCode.ARROW_RIGHT, Key.RIGHT));
    w.addShortcutListener(new ShortcutListenerImpl(KeyCode.ARROW_LEFT, Key.LEFT));
    w.addShortcutListener(new ShortcutListenerImpl(KeyCode.ARROW_UP, Key.UP));
    w.addShortcutListener(new ShortcutListenerImpl(KeyCode.ARROW_DOWN, Key.DOWN));
}