if (res != null && params.isReplaceDefault()) {
return res;
}
ProcessInfoBuilder builder = new ProcessInfoBuilder(params);
builder.addComponent(createCreatorLabel(builder.getParams()), MIDDLE_CENTER);
builder.addComponent(createCreateDateLabel(builder.getParams()), MIDDLE_CENTER);
builder.addComponent(createAssigneeLabel(builder.getParams()), MIDDLE_CENTER);
builder.addComponent(createDeadlineDateLabel(builder.getParams()), MIDDLE_LEFT);
if (res != null) {
VerticalLayout layout = new VerticalLayout();
layout.setWidth("100%");
layout.setSpacing(true);
layout.addComponent(builder.buildLayout());
layout.addComponent(res);
return layout;
}
else {
return builder.buildLayout();
}
}