diff options
author | elmot <elmot@vaadin.com> | 2016-04-13 15:01:50 +0300 |
---|---|---|
committer | elmot <elmot@vaadin.com> | 2016-04-13 15:32:47 +0300 |
commit | 980f879176696906c25e985e4f7c8e3bdc04258d (patch) | |
tree | d781a70e24eef0994ba5d371280e1cf837f94825 /shared | |
parent | f7f5ba596dbba0c2374a6d8ac10e89362cbbaeb5 (diff) | |
parent | 9b46608f6c645c4289b854e2949bae3b1a2f5147 (diff) | |
download | vaadin-framework-980f879176696906c25e985e4f7c8e3bdc04258d.tar.gz vaadin-framework-980f879176696906c25e985e4f7c8e3bdc04258d.zip |
Merge branch 'master' into feature/mavenize
Change-Id: Id7db526d07a14ac259cbb50415bbafd2a7c2ab94
Diffstat (limited to 'shared')
-rw-r--r-- | shared/src/main/java/com/vaadin/shared/ui/MarginInfo.java | 20 | ||||
-rw-r--r-- | shared/src/main/java/com/vaadin/shared/ui/draganddropwrapper/DragAndDropWrapperServerRpc.java | 34 |
2 files changed, 49 insertions, 5 deletions
diff --git a/shared/src/main/java/com/vaadin/shared/ui/MarginInfo.java b/shared/src/main/java/com/vaadin/shared/ui/MarginInfo.java index a8979b36cf..92f7956015 100644 --- a/shared/src/main/java/com/vaadin/shared/ui/MarginInfo.java +++ b/shared/src/main/java/com/vaadin/shared/ui/MarginInfo.java @@ -68,7 +68,11 @@ public class MarginInfo implements Serializable { * enable or disable left margin */ public MarginInfo(boolean top, boolean right, boolean bottom, boolean left) { - setMargins(top, right, bottom, left); + doSetMargins(top, right, bottom, left); + } + + public MarginInfo(boolean vertical, boolean horizontal) { + this(vertical, horizontal, vertical, horizontal); } /** @@ -96,10 +100,7 @@ public class MarginInfo implements Serializable { */ public void setMargins(boolean top, boolean right, boolean bottom, boolean left) { - bitMask = top ? TOP : 0; - bitMask += right ? RIGHT : 0; - bitMask += bottom ? BOTTOM : 0; - bitMask += left ? LEFT : 0; + doSetMargins(top, right, bottom, left); } /** @@ -188,4 +189,13 @@ public class MarginInfo implements Serializable { + hasBottom() + ", " + hasLeft() + ")"; } + + private void doSetMargins(boolean top, boolean right, boolean bottom, + boolean left) { + bitMask = top ? TOP : 0; + bitMask += right ? RIGHT : 0; + bitMask += bottom ? BOTTOM : 0; + bitMask += left ? LEFT : 0; + } + } diff --git a/shared/src/main/java/com/vaadin/shared/ui/draganddropwrapper/DragAndDropWrapperServerRpc.java b/shared/src/main/java/com/vaadin/shared/ui/draganddropwrapper/DragAndDropWrapperServerRpc.java new file mode 100644 index 0000000000..241518c3e3 --- /dev/null +++ b/shared/src/main/java/com/vaadin/shared/ui/draganddropwrapper/DragAndDropWrapperServerRpc.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.draganddropwrapper; + +import com.vaadin.shared.communication.ServerRpc; + +/** + * RPC interface for calls from client to server. + * + * @since 7.6.4 + * @author Vaadin Ltd + */ +public interface DragAndDropWrapperServerRpc extends ServerRpc { + + /** + * Called to poll the server to see if any changes have been made e.g. when + * the upload is complete. + */ + public void poll(); + +} |