if (type == null) {
return null;
}
String typeCompare = type.toLowerCase();
if (typeCompare.equals("vertical")) {
return new VerticalLayout();
} else if (typeCompare.equals("center")) {
return new CenterLayout();
} else if (typeCompare.equals("horizontal")) {
return new HorizontalLayout();
} else if (typeCompare.equals("overlay")) {