}
final BorderLayoutData data = getLayoutData(c);
if (c instanceof CollapsePanel) {
final CollapsePanel collapse = (CollapsePanel) c;
final BorderLayoutData panelData = (BorderLayoutData) collapse.getContentPanel().getLayoutData();
SplitBar bar = collapse.getData("splitBar");
if (bar == null || bar.getTargetWidget() != c) {
bar = collapse.getSplitBar();
bar.setCollapsible(true);
c.setData("splitBar", bar);
if (panelData.isCollapseHidden()) {
collapse.collapseHidden();
}
bar.addSelectHandler(new SelectHandler() {
@Override
public void onSelect(SelectEvent event) {