componentList.addAll(newComponents);
// Make sure coordinateLayout gets done every time
- iLayout(-1, -1);
+ iLayout();
}// updateFromUIDL
* (non-Javadoc)
*
* @see
- * com.itmill.toolkit.terminal.gwt.client.ContainerResizedListener#iLayout
- * (int, int)
+ * com.itmill.toolkit.terminal.gwt.client.ContainerResizedListener#iLayout()
*/
- public void iLayout(int availableWidth, int availableHeight) {
+ public void iLayout() {
// shake
// TODO is this necessary?
getOffsetWidth();
if (!toUpdate.isEmpty()) {
- // Run layout functions for children
- client.runDescendentsLayout(this);
-
// Go over all children and calculate their positions
for (Iterator<Widget> componentIterator = toUpdate.iterator(); componentIterator
.hasNext();) {
updateCaptionPosition(componentMarker, componentWidget);
}
}
+
+ // Run layout functions for children
+ client.runDescendentsLayout(this);
}
toUpdate.clear();
* @return
*/
protected native String getMargin(Element e, String CSSProp)/*-{
- return $wnd.getComputedStyle(e,null).getPropertyValue(CSSProp);
- }-*/;
+ return $wnd.getComputedStyle(e,null).getPropertyValue(CSSProp);
+ }-*/;
/**
* Retrieves margin info in IE
* @return
*/
protected native String getIEMargin(Element e)/*-{
- return e.currentStyle.margin;
- }-*/;
+ return e.currentStyle.margin;
+ }-*/;
/**
* @return all components that are not captions
return list;
}
+ public boolean requestLayout(Set<Paintable> child) {
+ return true;
+ }
+
+ public Size getAllocatedSpace(Widget child) {
+ Element area = componentToArea.get(child);
+ if (area != null) {
+ return new Size(area.getOffsetWidth(), area.getOffsetHeight());
+ } else {
+ return new Size(layout[WIDTH], layout[HEIGHT]);
+ }
+ }
+
/*
* Widget methods
*/
}
}
- public Size getAllocatedSpace(Widget child) {
- Element area = componentToArea.get(child);
- if (area != null) {
- return new Size(area.getOffsetWidth(), area.getOffsetHeight());
- } else {
- return new Size(layout[WIDTH], layout[HEIGHT]);
- }
- }
-
- public boolean requestLayout(Set<Paintable> child) {
- // TODO Auto-generated method stub
- return false;
- }
-
- public void iLayout() {
- // TODO Auto-generated method stub
-
- }
-
}// class ICoordinateLayout