From 1a95d50942f64bec70647587408f37d34addb767 Mon Sep 17 00:00:00 2001 From: Automerge Date: Wed, 18 Apr 2012 13:21:32 +0000 Subject: [merge from 6.7] enhanced test case svn changeset:23575/svn branch:6.8 --- .../vaadin/tests/components/TouchScrollables.java | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/testbench/com/vaadin/tests/components/TouchScrollables.java b/tests/testbench/com/vaadin/tests/components/TouchScrollables.java index 39e5bb02c4..8d3ef715cc 100644 --- a/tests/testbench/com/vaadin/tests/components/TouchScrollables.java +++ b/tests/testbench/com/vaadin/tests/components/TouchScrollables.java @@ -4,6 +4,8 @@ import java.util.Collection; import com.vaadin.data.Item; import com.vaadin.data.util.IndexedContainer; +import com.vaadin.event.Action; +import com.vaadin.event.Action.Handler; import com.vaadin.event.DataBoundTransferable; import com.vaadin.event.dd.DragAndDropEvent; import com.vaadin.event.dd.DropHandler; @@ -108,12 +110,28 @@ public class TouchScrollables extends TestBase { private void addDDSortableTable() { final Table table; table = new Table(); - table.setCaption("DD sortable table"); + table.setCaption("DD sortable table with context menus"); // table.setWidth("100%"); table.setPageLength(10); table.setRowHeaderMode(Table.ROW_HEADER_MODE_ID); table.setSelectable(true); table.setMultiSelect(true); + + table.addActionHandler(new Handler() { + + Action[] actions = new Action[] { new Action("FOO"), + new Action("BAR"), new Action("CAR") }; + + public Action[] getActions(Object target, Object sender) { + return actions; + } + + public void handleAction(Action action, Object sender, Object target) { + getLayout().getWindow().showNotification(action.getCaption()); + + } + }); + populateTable(table); /* -- cgit v1.2.3