component.el().setLeftTop(box.x, box.y);
component.setSize(box.width, box.height);
}
private CollapsePanel createCollapsePanel(ContentPanel panel, BorderLayoutData data) {
CollapsePanel cp = new CollapsePanel(panel, data) {
protected void onExpandButton(BaseEvent be) {
if (isExpanded()) {
setExpanded(false);
}
onExpandClick(this);
}
};
BorderLayoutData collapseData = new BorderLayoutData(data.getRegion());
collapseData.setSize(24);
collapseData.setMargins(data.getMargins());
ComponentHelper.setLayoutData(cp, collapseData);
cp.setData("panel", panel);
panel.setData("collapse", cp);
return cp;
}