diff options
author | Teemu Suo-Anttila <teemusa@vaadin.com> | 2015-09-29 13:59:06 +0300 |
---|---|---|
committer | Henri Sara <hesara@vaadin.com> | 2015-10-05 07:38:40 +0000 |
commit | dd029323df6d7ec11b85716601ad9c446c720602 (patch) | |
tree | 729230f82ed9a672416a1e9c50926fcf4ab670b9 /shared | |
parent | a97534f4c2588e68ecc2584d77db482a5277d599 (diff) | |
download | vaadin-framework-dd029323df6d7ec11b85716601ad9c446c720602.tar.gz vaadin-framework-dd029323df6d7ec11b85716601ad9c446c720602.zip |
Add GridContextClickEvent with item ids, properties and section (#16855)
Change-Id: I03091a3a7a22a921c127ed0b37fe792871ba5edd
Diffstat (limited to 'shared')
-rw-r--r-- | shared/src/com/vaadin/shared/ui/grid/GridConstants.java | 7 | ||||
-rw-r--r-- | shared/src/com/vaadin/shared/ui/grid/GridServerRpc.java | 19 |
2 files changed, 26 insertions, 0 deletions
diff --git a/shared/src/com/vaadin/shared/ui/grid/GridConstants.java b/shared/src/com/vaadin/shared/ui/grid/GridConstants.java index 5b2ac96975..ba4a677b5f 100644 --- a/shared/src/com/vaadin/shared/ui/grid/GridConstants.java +++ b/shared/src/com/vaadin/shared/ui/grid/GridConstants.java @@ -27,6 +27,13 @@ import java.io.Serializable; public final class GridConstants implements Serializable { /** + * Enum describing different sections of Grid. + */ + public enum Section { + HEADER, BODY, FOOTER + } + + /** * Default padding in pixels when scrolling programmatically, without an * explicitly defined padding value. */ diff --git a/shared/src/com/vaadin/shared/ui/grid/GridServerRpc.java b/shared/src/com/vaadin/shared/ui/grid/GridServerRpc.java index 8d64794b41..83abc5263e 100644 --- a/shared/src/com/vaadin/shared/ui/grid/GridServerRpc.java +++ b/shared/src/com/vaadin/shared/ui/grid/GridServerRpc.java @@ -20,6 +20,7 @@ import java.util.List; import com.vaadin.shared.MouseEventDetails; import com.vaadin.shared.communication.ServerRpc; import com.vaadin.shared.data.sort.SortDirection; +import com.vaadin.shared.ui.grid.GridConstants.Section; /** * Client-to-server RPC interface for the Grid component @@ -70,6 +71,24 @@ public interface GridServerRpc extends ServerRpc { void itemClick(String rowKey, String columnId, MouseEventDetails details); /** + * Informs the server that a context click has happened inside of Grid. + * + * @since + * @param rowIndex + * index of clicked row in Grid section + * @param rowKey + * a key identifying the clicked item + * @param columnId + * column id identifying the clicked property + * @param section + * grid section (header, footer, body) + * @param details + * mouse event details + */ + void contextClick(int rowIndex, String rowKey, String columnId, + Section section, MouseEventDetails details); + + /** * Informs the server that the columns of the Grid have been reordered. * * @since 7.5.0 |