private Dimension calculateChildrenSize(List children, int wHint, int hHint, boolean preferred) { Dimension childSize; IFigure child; int height = 0, width = 0; for (int i = 0; i < children.size(); i++) { child = (IFigure) children.get(i); if (child instanceof AbstractTreeSettingContainer) { if (!tableMananger.isActivateCondensedTool()) { continue; } } if (child instanceof FilterContainer) { if (!tableMananger.isActivateExpressionFilter()) { continue; } } if (child instanceof AbstractGlobalMapContainer) { if (!tableMananger.isActivateGlobalMap()) { continue; } } childSize = transposer.t( preferred ? getChildPreferredSize(child, wHint, hHint) : getChildMinimumSize(child, wHint, hHint)); height += childSize.height; width = Math.max(width, childSize.width); // header figure must be the first figure , or there will be problem here if (tableMananger.isMinimized()) { break; } } return new Dimension(width, height); }