DOM.sinkEvents(contentNode, Event.ONSCROLL);
}
+ @Override
protected Element getContainerElement() {
return contentNode;
}
"offsetWidth");
int borderWidthGuess = 200;
int widthGuess = captionOffsetWidth - borderWidthGuess;
+ if (widthGuess < 0) {
+ widthGuess = 0;
+ }
DOM.setStyleAttribute(contentNode, "width", widthGuess + "px");
int actualBorder = DOM.getElementPropertyInt(contentNode,
if (actualBorder != borderWidthGuess) {
int realWidthIncludingBorder = captionOffsetWidth
- actualBorder;
+ if (realWidthIncludingBorder < 0) {
+ realWidthIncludingBorder = 0;
+ }
DOM.setStyleAttribute(contentNode, "width",
realWidthIncludingBorder + "px");
}
Util.runDescendentsLayout(this);
}
+ @Override
public void onBrowserEvent(Event event) {
final Element target = DOM.eventGetTarget(event);
final int type = DOM.eventGetType(event);
/**
* Panel handles dimensions by itself.
*/
+ @Override
public void setHeight(String height) {
// NOP
}
/**
* Panel handles dimensions by itself.
*/
+ @Override
public void setWidth(String width) {
this.width = width;
// Let browser handle 100% width (DIV element takes all size by