summaryrefslogtreecommitdiffstats
path: root/shared
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2015-10-05 11:23:46 +0300
committerVaadin Code Review <review@vaadin.com>2015-10-05 11:10:13 +0000
commit5097095625403405d030575fcc1102f02aa3e327 (patch)
tree99d68d5d570a33f6fb2435b4f7d68dc5c563641c /shared
parent743095d97bbd632e0493fca29ba2308b17b86716 (diff)
downloadvaadin-framework-5097095625403405d030575fcc1102f02aa3e327.tar.gz
vaadin-framework-5097095625403405d030575fcc1102f02aa3e327.zip
Add support for TreeContextClickEvents (#19062)
Tree connector now overrides the send context click event providing the row key to the server-side via RPC call. This is then passed on to a TreeContextClickEvent and fired to listeners. This patch modifies the test base for context click testing by making it tolerate 1 piksel differences. This was to fix any subpixel related issues in coordinate comparison. Change-Id: Iacced274a6b518b5f89378cbc32b8381362e1e4f
Diffstat (limited to 'shared')
-rw-r--r--shared/src/com/vaadin/shared/ui/tree/TreeServerRpc.java34
1 files changed, 34 insertions, 0 deletions
diff --git a/shared/src/com/vaadin/shared/ui/tree/TreeServerRpc.java b/shared/src/com/vaadin/shared/ui/tree/TreeServerRpc.java
new file mode 100644
index 0000000000..e9ccdb57c6
--- /dev/null
+++ b/shared/src/com/vaadin/shared/ui/tree/TreeServerRpc.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.shared.ui.tree;
+
+import com.vaadin.shared.MouseEventDetails;
+import com.vaadin.shared.communication.ServerRpc;
+
+/**
+ * Client-to-server RPC interface for the Tree component
+ *
+ * @since
+ * @author Vaadin Ltd
+ */
+public interface TreeServerRpc extends ServerRpc {
+
+ /**
+ * Informs the server that a context click happened inside of Tree
+ */
+ public void contextClick(String rowKey, MouseEventDetails details);
+
+} \ No newline at end of file