import com.itmill.toolkit.terminal.gwt.client.ApplicationConnection;
import com.itmill.toolkit.terminal.gwt.client.BrowserInfo;
import com.itmill.toolkit.terminal.gwt.client.Container;
-import com.itmill.toolkit.terminal.gwt.client.ContainerResizedListener;
import com.itmill.toolkit.terminal.gwt.client.IErrorMessage;
import com.itmill.toolkit.terminal.gwt.client.Paintable;
import com.itmill.toolkit.terminal.gwt.client.RenderInformation;
import com.itmill.toolkit.terminal.gwt.client.UIDL;
import com.itmill.toolkit.terminal.gwt.client.Util;
-public class IPanel extends SimplePanel implements Container,
- ContainerResizedListener {
+public class IPanel extends SimplePanel implements Container {
public static final String CLASSNAME = "i-panel";
private int captionMarginLeft = -1;
+ private boolean rendering;
+
private int contentMarginLeft = -1;
public IPanel() {
}
public void updateFromUIDL(UIDL uidl, ApplicationConnection client) {
+ rendering = true;
// Ensure correct implementation
if (client.updateComponent(this, uidl, false)) {
+ rendering = false;
return;
}
// IE/FF2 is not able to make the offsetWidth for contentNode
// correct
// for some reason...
- iLayout(false);
+ runHacks(false);
}
// We may have actions attached to this panel
if (uidl.getChildCount() > 1) {
DOM.setElementPropertyInt(contentNode, "scrollLeft", scrollLeft);
}
+ rendering = false;
+
}
private void handleError(UIDL uidl) {
}
}
- public void iLayout() {
- iLayout(true);
- }
-
- public void iLayout(boolean runGeckoFix) {
+ public void runHacks(boolean runGeckoFix) {
if (BrowserInfo.get().isIE6() && width != null && !width.equals("")) {
/*
* IE6 requires overflow-hidden elements to have a width specified
} else {
DOM.setStyleAttribute(contentNode, "height", "");
}
+ if (!rendering) {
+ runHacks(true);
+ }
}
private int getCaptionMarginLeft() {
@Override
public void setWidth(String width) {
this.width = width;
-
super.setWidth(width);
-
+ if (!rendering) {
+ runHacks(true);
+ }
}
private int getContainerBorderWidth() {
*/
return true;
}
- iLayout(false);
+ runHacks(false);
return !renderInformation.updateSize(getElement());
}