if (left != null) {
JComponent leftComponent = (JComponent) left;
WidgetAdapter leftAdapter = WidgetAdapter
.getWidgetAdapter(leftComponent);
if (leftAdapter != null) {
IParser leftParser = (IParser) leftAdapter
.getAdapter(IParser.class);
String leftGetName = leftParser.getCreationMethodName();
builder.append(prefix + "setLeftComponent(" + leftGetName
+ "());\n");
}
}
Component right = jsp.getRightComponent();
if (right != null) {
JComponent rightComponent = (JComponent) right;
WidgetAdapter rightAdapter = WidgetAdapter
.getWidgetAdapter(rightComponent);
if (rightAdapter != null) {
IParser rightParser = (IParser) rightAdapter
.getAdapter(IParser.class);
String rightGetName = rightParser.getCreationMethodName();
builder.append(prefix + "setRightComponent(" + rightGetName
+ "());\n");
}
}
} else {
Component top = jsp.getTopComponent();
if (top != null) {
JComponent topComponent = (JComponent) top;
WidgetAdapter topAdapter = WidgetAdapter
.getWidgetAdapter(topComponent);
if (topAdapter != null) {
IParser topParser = (IParser) topAdapter
.getAdapter(IParser.class);
String topGetName = topParser.getCreationMethodName();
builder.append(prefix + "setTopComponent(" + topGetName
+ "());\n");
}
}
Component bottom = jsp.getBottomComponent();
if (bottom != null) {
JComponent bottomComponent = (JComponent) bottom;
WidgetAdapter bottomAdapter = WidgetAdapter
.getWidgetAdapter(bottomComponent);
if (bottomAdapter != null) {
IParser bottomParser = (IParser) bottomAdapter
.getAdapter(IParser.class);
String bottomGetName = bottomParser.getCreationMethodName();
builder.append(prefix + "setBottomComponent("
+ bottomGetName + "());\n");
}
}