int count = container.getItemCount();
// some columns can be percentages while others are fixed
// so we need to make 2 passes
for (int i = 0; i < count; i++) {
Component c = container.getItem(i);
if(!c.isVisible(false)){
continue;
}
c.el().makePositionable(true);
c.el().setStyleAttribute("margin", "0px");
RowData data = null;
LayoutData d = getLayoutData(c);
if (d != null && d instanceof RowData) {
data = (RowData) d;
} else {
data = new RowData();
}
if (data.getWidth() > 1) {
pw -= data.getWidth();
} else if (data.getWidth() == -1) {
callLayout(c, false);
pw -= c.getOffsetWidth();
if (data.getMargins() != null) {
pw -= data.getMargins().left;
pw -= data.getMargins().right;
}
}
}
pw = pw < 0 ? 0 : pw;
int x = target.getPadding("l");
int sTop = target.getPadding("t");
for (int i = 0; i < count; i++) {
Component c = container.getItem(i);
if(!c.isVisible(false)){
continue;
}
RowData data = null;
LayoutData d = getLayoutData(c);
if (d != null && d instanceof RowData) {
data = (RowData) d;
} else {
data = new RowData();
}
double height = data.getHeight();
if (height > 0 && height <= 1) {
height = height * h;
} else if (height == -1) {
height = c.getOffsetHeight();
}
double width = data.getWidth();
if (width > 0 && width <= 1) {
width = width * pw;
} else if (width == -1) {
width = c.getOffsetWidth();
}
int tx = x;
int ty = sTop;
int tw = (int) width;