assert windowContent instanceof Persistable;
// TODO change to WindowModel, keep in workspace, update
// automatically
WindowDTO windowDTO = new WindowDTO();
windowDTO.setX(window.getAbsoluteX());
windowDTO.setY(window.getAbsoluteY());
windowDTO.setHeight(window.getOffsetHeight());
windowDTO.setWidth(window.getOffsetWidth());
// TODO store x-zindex
// TODO use view content label instead of window title
windowDTO.setTitle(window.getWindowTitle());
windowDTO.setContentType(windowContent.getContentType());
Persistable persistable = (Persistable) windowContent;
windowDTO.setViewState(persistable.save(persistanceManager));
return windowDTO;
}