From 92da25c0b494e059985486bfaaabf434ac59afa1 Mon Sep 17 00:00:00 2001 From: Markus Koivisto Date: Wed, 30 Jul 2014 17:28:41 +0300 Subject: Fix typo that caused spanned cells to be removed in Gridlayout (#14335) Gridlayout removes columns and rows with no content. Gridlayout is supposed to check for spanned cells and not remove otherwise empty rows or columns if they are covered by a span. Change-Id: I1c25a8e6426e6ce0e24f9110a6b994598c395e7a --- client/src/com/vaadin/client/ui/VGridLayout.java | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'client/src') diff --git a/client/src/com/vaadin/client/ui/VGridLayout.java b/client/src/com/vaadin/client/ui/VGridLayout.java index 10e5c00a38..17131ce63b 100644 --- a/client/src/com/vaadin/client/ui/VGridLayout.java +++ b/client/src/com/vaadin/client/ui/VGridLayout.java @@ -95,7 +95,7 @@ public class VGridLayout extends ComplexPanel { /** * Returns the column widths measured in pixels - * + * * @return */ protected int[] getColumnWidths() { @@ -104,7 +104,7 @@ public class VGridLayout extends ComplexPanel { /** * Returns the row heights measured in pixels - * + * * @return */ protected int[] getRowHeights() { @@ -113,7 +113,7 @@ public class VGridLayout extends ComplexPanel { /** * Returns the spacing between the cells horizontally in pixels - * + * * @return */ protected int getHorizontalSpacing() { @@ -122,7 +122,7 @@ public class VGridLayout extends ComplexPanel { /** * Returns the spacing between the cells vertically in pixels - * + * * @return */ protected int getVerticalSpacing() { @@ -271,7 +271,7 @@ public class VGridLayout extends ComplexPanel { } for (SpanList l : rowSpans) { for (Cell cell : l.cells) { - if (cell.row >= i && i < cell.row + cell.rowspan) { + if (cell.row <= i && i < cell.row + cell.rowspan) { return true; } } @@ -287,7 +287,7 @@ public class VGridLayout extends ComplexPanel { } for (SpanList l : colSpans) { for (Cell cell : l.cells) { - if (cell.col >= i && i < cell.col + cell.colspan) { + if (cell.col <= i && i < cell.col + cell.colspan) { return true; } } @@ -751,7 +751,7 @@ public class VGridLayout extends ComplexPanel { * Creates a new Cell with the given coordinates. *

* For internal use only. May be removed or replaced in the future. - * + * * @param row * @param col * @return @@ -767,7 +767,7 @@ public class VGridLayout extends ComplexPanel { * child component is also returned if "element" is part of its caption. *

* For internal use only. May be removed or replaced in the future. - * + * * @param element * An element that is a nested sub element of the root element in * this layout @@ -788,13 +788,13 @@ public class VGridLayout extends ComplexPanel { * child component is also returned if "element" is part of its caption. *

* For internal use only. May be removed or replaced in the future. - * + * * @param element * An element that is a nested sub element of the root element in * this layout * @return The Paintable which the element is a part of. Null if the element * belongs to the layout and not to a child. - * + * * @since 7.2 */ public ComponentConnector getComponent(Element element) { -- cgit v1.2.3