diff options
Diffstat (limited to 'server/src/main/java/com/vaadin/ui/GridLayout.java')
-rw-r--r-- | server/src/main/java/com/vaadin/ui/GridLayout.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/server/src/main/java/com/vaadin/ui/GridLayout.java b/server/src/main/java/com/vaadin/ui/GridLayout.java index 0a3e139ea9..46275dfdaf 100644 --- a/server/src/main/java/com/vaadin/ui/GridLayout.java +++ b/server/src/main/java/com/vaadin/ui/GridLayout.java @@ -203,8 +203,9 @@ public class GridLayout extends AbstractLayout // Checks the validity of the coordinates if (column2 < column1 || row2 < row1) { - throw new IllegalArgumentException( - "Illegal coordinates for the component"); + throw new IllegalArgumentException(String.format( + "Illegal coordinates for the component: %s!<=%s, %s!<=%s", + column1, column2, row1, row2)); } if (column1 < 0 || row1 < 0 || column2 >= getColumns() || row2 >= getRows()) { @@ -611,6 +612,11 @@ public class GridLayout extends AbstractLayout return childData.row2; } + @Override + public String toString() { + return String.format("Area{%s,%s - %s,%s}", getColumn1(), getRow1(), + getColumn2(), getRow2()); + } } private static boolean componentsOverlap(ChildComponentData a, @@ -694,6 +700,8 @@ public class GridLayout extends AbstractLayout * @param areaOutOfBounds */ public OutOfBoundsException(Area areaOutOfBounds) { + super(String.format("%s, layout dimension: %sx%s", areaOutOfBounds, + getColumns(), getRows())); this.areaOutOfBounds = areaOutOfBounds; } |