// TODO
}
- private RenderSpace contentNodeSize;
-
public RenderSpace getAllocatedSpace(Widget child) {
- if (contentNodeSize == null) {
- contentNodeSize = new RenderSpace(-1, -1) {
-
- @Override
- public int getHeight() {
- return contentNode.getOffsetHeight()
- - getContainerBorderHeight();
- }
+ int w = 0;
+ int h = 0;
- @Override
- public int getWidth() {
- return contentNode.getOffsetWidth()
- - getContainerBorderWidth();
- }
-
- @Override
- public int getScrollbarSize() {
- return Util.getNativeScrollbarSize();
- }
+ if (width != null && !width.equals("")) {
+ w = getOffsetWidth() - getContainerBorderWidth();
+ }
- };
+ if (height != null && !height.equals("")) {
+ w = getOffsetHeight() - getContainerBorderHeight();
}
- return contentNodeSize;
+
+ return new RenderSpace(w, h);
}
public boolean requestLayout(Set<Paintable> child) {
// NOP: layouts caption, errors etc not rendered in Panel
}
+ @Override
+ protected void onAttach() {
+ super.onAttach();
+ detectContainerBorders();
+ }
+
}