summaryrefslogtreecommitdiffstats
path: root/shared
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-11-29 12:02:47 +0200
committerVaadin Code Review <review@vaadin.com>2012-11-29 13:44:25 +0000
commit3c05a351908353c4c99c14bb5a8fcd3ea9fc7afe (patch)
treecac0e0cb7721fd8264cf902a7b382abf2acbc73e /shared
parent54665ea8ee6cc091eb3409c3f1476a30d11c7af2 (diff)
downloadvaadin-framework-3c05a351908353c4c99c14bb5a8fcd3ea9fc7afe.tar.gz
vaadin-framework-3c05a351908353c4c99c14bb5a8fcd3ea9fc7afe.zip
Update GridLayout DOM in onConnectorHierarchyChange (#10324, #10097)
* Add ChildComponentData that is sent in the state instead of previous UIDL data * Store child data in a map instead of as a linked list * Move Cell instead of moving component form one Cell to the other if moved * Clean up internal state in remove(Widget) Change-Id: I3dabe0165b6dcdf70c0df06a0151b73d080187a5
Diffstat (limited to 'shared')
-rw-r--r--shared/src/com/vaadin/shared/ui/gridlayout/GridLayoutState.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/shared/src/com/vaadin/shared/ui/gridlayout/GridLayoutState.java b/shared/src/com/vaadin/shared/ui/gridlayout/GridLayoutState.java
index e8a90adcd5..af5ae87895 100644
--- a/shared/src/com/vaadin/shared/ui/gridlayout/GridLayoutState.java
+++ b/shared/src/com/vaadin/shared/ui/gridlayout/GridLayoutState.java
@@ -15,9 +15,17 @@
*/
package com.vaadin.shared.ui.gridlayout;
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+
+import com.vaadin.shared.Connector;
import com.vaadin.shared.ui.AbstractLayoutState;
+import com.vaadin.shared.ui.AlignmentInfo;
public class GridLayoutState extends AbstractLayoutState {
+ public static AlignmentInfo ALIGNMENT_DEFAULT = AlignmentInfo.TOP_LEFT;
+
{
primaryStyleName = "v-gridlayout";
}
@@ -25,4 +33,13 @@ public class GridLayoutState extends AbstractLayoutState {
public int rows = 0;
public int columns = 0;
public int marginsBitmask = 0;
+ public Map<Connector, ChildComponentData> childData = new HashMap<Connector, GridLayoutState.ChildComponentData>();
+
+ public static class ChildComponentData implements Serializable {
+ public int column1;
+ public int row1;
+ public int column2;
+ public int row2;
+ public int alignment = ALIGNMENT_DEFAULT.getBitMask();
+ }
} \ No newline at end of file