Object obj = w.getLayoutData();
if (obj instanceof BorderLayoutData && w instanceof Component) {
BorderLayoutData data = (BorderLayoutData) obj;
Component c = (Component)w;
String id = c.getId();
Map<String, Double> sizes = getState().getSizes();
if (sizes != null && sizes.containsKey(id)) {
data.setSize(sizes.get(id));
}
if (c instanceof ContentPanel) {
Set<String> collapsed = getState().getCollapsed();
if (collapsed != null && collapsed.contains(id)) {
data.setCollapsed(true);
}
}
SplitBar bar = c.getData("splitBar");
if (bar != null) {
bar.addSplitBarDragHandler(splitBarHandler);
}
}