@Override
public void setWidth(String width) {
if (this.width.equals(width) || !isVisible()) {
return;
}
Size sizeBefore = new Size(activeLayoutSize.getWidth(),
activeLayoutSize.getHeight());
super.setWidth(width);
this.width = width;
if (width != null && !width.equals("")) {
setActiveLayoutWidth(getOffsetWidth()
- activeMargins.getHorizontal());
}
if (isRendering) {
sizeHasChangedDuringRendering = true;
} else {
recalculateLayoutAndComponentSizes();
boolean sameSize = (sizeBefore.equals(activeLayoutSize));
if (!sameSize) {
/* Must inform child components about possible size updates */
client.runDescendentsLayout(this);
}
/*
* If the height changes as a consequence of this we must inform the
* parent also
*/
if (isDynamicHeight()
&& sizeBefore.getHeight() != activeLayoutSize.getHeight()) {
Util.notifyParentOfSizeChange(this, false);
}
}
}