diff options
author | Johannes Dahlström <johannes.dahlstrom@vaadin.com> | 2012-07-27 14:39:23 +0000 |
---|---|---|
committer | Johannes Dahlström <johannes.dahlstrom@vaadin.com> | 2012-07-27 14:39:23 +0000 |
commit | fbddc9eff67a8392246d333d0c826d4e71edafa8 (patch) | |
tree | 9acb066cdc4e7d67d4130a402b1f124d46daef9b /tests/testbench/com/vaadin | |
parent | 8374a0aa32dec95d8fb72f6f0d3cf286cc3684f4 (diff) | |
download | vaadin-framework-fbddc9eff67a8392246d333d0c826d4e71edafa8.tar.gz vaadin-framework-fbddc9eff67a8392246d333d0c826d4e71edafa8.zip |
Explicitly delegate keyboard events from the PopupView popup to the relevant shortcut action handler (#8193)
svn changeset:24031/svn branch:6.8
Diffstat (limited to 'tests/testbench/com/vaadin')
-rw-r--r-- | tests/testbench/com/vaadin/tests/components/popupview/PopupViewClickShortcut.java | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/tests/testbench/com/vaadin/tests/components/popupview/PopupViewClickShortcut.java b/tests/testbench/com/vaadin/tests/components/popupview/PopupViewClickShortcut.java index 7009d03f77..c8d4ee9858 100644 --- a/tests/testbench/com/vaadin/tests/components/popupview/PopupViewClickShortcut.java +++ b/tests/testbench/com/vaadin/tests/components/popupview/PopupViewClickShortcut.java @@ -45,16 +45,18 @@ public class PopupViewClickShortcut extends TestBase { l.setCaption(caption); l.setWidth(null); - Button b = new Button("Submit " + caption, new Button.ClickListener() { - private int i = 5; + Button b = new Button("Submit " + caption + " (Ctrl+Alt+" + + String.valueOf(Character.toChars(keyCode)) + ")", + new Button.ClickListener() { + private int i = 5; - public void buttonClick(ClickEvent event) { - log.log("Submitted from " - + event.getButton().getParent().getCaption()); - t.addItem(new String[] { "added " + i++ }, i); - } - }); - b.setClickShortcut(keyCode, ModifierKey.ALT); + public void buttonClick(ClickEvent event) { + log.log("Submitted from " + + event.getButton().getParent().getCaption()); + t.addItem(new String[] { "added " + i++ }, i); + } + }); + b.setClickShortcut(keyCode, ModifierKey.CTRL, ModifierKey.ALT); l.addComponent(t); l.addComponent(b); |