diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2016-04-15 11:06:18 +0300 |
---|---|---|
committer | Teemu Suo-Anttila <teemusa@vaadin.com> | 2016-04-15 14:00:58 +0300 |
commit | 6b8412033e680ce6e5c7827ac504adf132305726 (patch) | |
tree | 0df05d16c324b285610af8910c126b58f4c490c5 /uitest/src/main/java/com/vaadin/tests/actions/ActionsWithoutKeyCode.java | |
parent | 9192b0bb5e5e699b506b3d3e7df4cf295fbea44a (diff) | |
download | vaadin-framework-6b8412033e680ce6e5c7827ac504adf132305726.tar.gz vaadin-framework-6b8412033e680ce6e5c7827ac504adf132305726.zip |
Build uitest war with maven
Change-Id: I32625901ca27a282253df44c6e776cf9632bacda
Diffstat (limited to 'uitest/src/main/java/com/vaadin/tests/actions/ActionsWithoutKeyCode.java')
-rw-r--r-- | uitest/src/main/java/com/vaadin/tests/actions/ActionsWithoutKeyCode.java | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/uitest/src/main/java/com/vaadin/tests/actions/ActionsWithoutKeyCode.java b/uitest/src/main/java/com/vaadin/tests/actions/ActionsWithoutKeyCode.java new file mode 100644 index 0000000000..e94a4b1ade --- /dev/null +++ b/uitest/src/main/java/com/vaadin/tests/actions/ActionsWithoutKeyCode.java @@ -0,0 +1,39 @@ +package com.vaadin.tests.actions; + +import com.vaadin.event.Action; +import com.vaadin.server.VaadinRequest; +import com.vaadin.tests.components.AbstractTestUIWithLog; +import com.vaadin.ui.TextField; + +@SuppressWarnings("serial") +public class ActionsWithoutKeyCode extends AbstractTestUIWithLog { + + @Override + protected void setup(VaadinRequest request) { + TextField tf = new TextField(); + tf.setWidth("100%"); + tf.setInputPrompt("Enter text with å,ä or ä or press windows key while textfield is focused"); + addComponent(tf); + + addActionHandler(new Action.Handler() { + + private Action[] actions; + { + actions = new Action[] { new Action("test1") }; + } + + @Override + public Action[] getActions(Object target, Object sender) { + return actions; + } + + @Override + public void handleAction(Action action, Object sender, Object target) { + log("action " + action.getCaption() + " triggered by " + + sender.getClass().getSimpleName() + " on " + + target.getClass().getSimpleName()); + } + }); + } + +}
\ No newline at end of file |