From: Matti Tahvonen Date: Tue, 7 Oct 2008 11:44:09 +0000 (+0000) Subject: enhanced absolute grid X-Git-Tag: 6.7.0.beta1~4018 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2a2edf6f28a2355dfe948d9b584b6df3f08c3b26;p=vaadin-framework.git enhanced absolute grid svn changeset:5604/svn branch:trunk --- diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ui/absolutegrid/ISizeableGridLayout.java b/src/com/itmill/toolkit/terminal/gwt/client/ui/absolutegrid/ISizeableGridLayout.java index ed07b06f2a..918b916390 100644 --- a/src/com/itmill/toolkit/terminal/gwt/client/ui/absolutegrid/ISizeableGridLayout.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ui/absolutegrid/ISizeableGridLayout.java @@ -28,7 +28,7 @@ public class ISizeableGridLayout extends IAbsoluteGrid implements Paintable, Container { public static final String CLASSNAME = "i-gridlayout"; private int spacing; - private HashMap paintableToCellMap = new HashMap(); + private HashMap paintableToCellMap = new HashMap(); private MarginPixels mp; private String oldStyleString = ""; @@ -183,8 +183,7 @@ public class ISizeableGridLayout extends IAbsoluteGrid implements Paintable, } public void updateCaption(Paintable component, UIDL uidl) { - IAbsoluteGridCell cell = (IAbsoluteGridCell) paintableToCellMap - .get(component); + IAbsoluteGridCell cell = paintableToCellMap.get(component); ICaption c = cell.getCaption(); if (c == null) { c = new ICaption(component, client); @@ -251,13 +250,22 @@ public class ISizeableGridLayout extends IAbsoluteGrid implements Paintable, } public boolean requestLayout(Set child) { - // TODO Auto-generated method stub - return false; + for (Iterator iterator = child.iterator(); iterator.hasNext();) { + Paintable paintable = (Paintable) iterator.next(); + if (hasChildComponent((Widget) paintable)) { + IAbsoluteGridCell absoluteGridCell = paintableToCellMap + .get(paintable); + absoluteGridCell.vAling(); + } + } + // always has size, never change due child change + return true; } public RenderSpace getAllocatedSpace(Widget child) { - // TODO Auto-generated method stub - return null; + com.google.gwt.dom.client.Element e = child.getElement() + .getParentElement(); + return new RenderSpace(e.getOffsetWidth(), e.getOffsetHeight()); } }