diff options
author | Dmitrii Rogozin <dmitrii@vaadin.com> | 2014-05-22 14:04:48 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2014-06-11 11:17:29 +0000 |
commit | 3e5c5bc10752ae011ee74c82530452ba26521833 (patch) | |
tree | ee9bdad7558822525b853c331c6091e98e6e30a2 /shared/src | |
parent | ede8fbaad050c98682df9da935caf59a3a3787c6 (diff) | |
download | vaadin-framework-3e5c5bc10752ae011ee74c82530452ba26521833.tar.gz vaadin-framework-3e5c5bc10752ae011ee74c82530452ba26521833.zip |
Removes double spacing from gridLayout which has empty rows or columns (#8855)
If row has no elements or only invisible elements, its size will be set to zero.
When row expand ratio was set, its size will be assigned to the value according to an expand ratio.
If component takes several rows of the gridLayout, these rows are considered as non-empty and won't be removed.
Change-Id: I10ddd22a6c9535b9978769bab7b496e11a28b78a
Diffstat (limited to 'shared/src')
-rw-r--r-- | shared/src/com/vaadin/shared/ui/gridlayout/GridLayoutState.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/shared/src/com/vaadin/shared/ui/gridlayout/GridLayoutState.java b/shared/src/com/vaadin/shared/ui/gridlayout/GridLayoutState.java index ad0f34c862..768183cf73 100644 --- a/shared/src/com/vaadin/shared/ui/gridlayout/GridLayoutState.java +++ b/shared/src/com/vaadin/shared/ui/gridlayout/GridLayoutState.java @@ -1,12 +1,12 @@ /* * 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 @@ -17,7 +17,9 @@ package com.vaadin.shared.ui.gridlayout; import java.io.Serializable; import java.util.HashMap; +import java.util.HashSet; import java.util.Map; +import java.util.Set; import com.vaadin.shared.Connector; import com.vaadin.shared.ui.AbstractLayoutState; @@ -33,6 +35,9 @@ public class GridLayoutState extends AbstractLayoutState { public int rows = 0; public int columns = 0; public int marginsBitmask = 0; + // Set of indexes of implicitly Ratios rows and columns + public Set<Integer> explicitRowRatios = new HashSet<Integer>();; + public Set<Integer> explicitColRatios = new HashSet<Integer>(); public Map<Connector, ChildComponentData> childData = new HashMap<Connector, GridLayoutState.ChildComponentData>(); public static class ChildComponentData implements Serializable { @@ -41,5 +46,6 @@ public class GridLayoutState extends AbstractLayoutState { public int column2; public int row2; public int alignment = ALIGNMENT_DEFAULT.getBitMask(); + } } |