diff options
Diffstat (limited to 'shared')
-rw-r--r-- | shared/src/main/java/com/vaadin/shared/ui/treegrid/NodeCollapseRpc.java | 6 | ||||
-rw-r--r-- | shared/src/main/java/com/vaadin/shared/ui/treegrid/TreeGridClientRpc.java | 45 |
2 files changed, 50 insertions, 1 deletions
diff --git a/shared/src/main/java/com/vaadin/shared/ui/treegrid/NodeCollapseRpc.java b/shared/src/main/java/com/vaadin/shared/ui/treegrid/NodeCollapseRpc.java index 1b16203648..f0748a9b88 100644 --- a/shared/src/main/java/com/vaadin/shared/ui/treegrid/NodeCollapseRpc.java +++ b/shared/src/main/java/com/vaadin/shared/ui/treegrid/NodeCollapseRpc.java @@ -36,6 +36,10 @@ public interface NodeCollapseRpc extends ServerRpc { * index where the row is in grid (all rows) * @param collapse * {@code true} to collapse, {@code false} to expand + * @param userOriginated + * {@code true} if this RPC was triggered by a user interaction, + * {@code false} otherwise */ - void setNodeCollapsed(String rowKey, int rowIndex, boolean collapse); + void setNodeCollapsed(String rowKey, int rowIndex, boolean collapse, + boolean userOriginated); } diff --git a/shared/src/main/java/com/vaadin/shared/ui/treegrid/TreeGridClientRpc.java b/shared/src/main/java/com/vaadin/shared/ui/treegrid/TreeGridClientRpc.java new file mode 100644 index 0000000000..a07a2d4885 --- /dev/null +++ b/shared/src/main/java/com/vaadin/shared/ui/treegrid/TreeGridClientRpc.java @@ -0,0 +1,45 @@ +/* + * Copyright 2000-2016 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.treegrid; + +import com.vaadin.shared.communication.ClientRpc; + +/** + * Server-to-client RPC interface for the TreeGrid component. + * + * @since 8.1 + * @author Vaadin Ltd + */ +public interface TreeGridClientRpc extends ClientRpc { + + /** + * Inform the client that an item with the given key has been expanded by + * the server. + * + * @param key + * the communication key of the expanded item + */ + public void setExpanded(String key); + + /** + * Inform the client that an item with the given key has been collapsed by + * the server. + * + * @param key + * the communication key of the collapsed item + */ + public void setCollapsed(String key); +} |