if (isCreated()) {
getJSplitPane().setLeftComponent(new JPanel());
getJSplitPane().setRightComponent(new JPanel());
if (getLayout() instanceof StructureLayoutItem) {
StructureLayoutItem l = (StructureLayoutItem) getLayout();
LayoutEnumeration e = l.getStructureLayoutArray().getEnumeration();
DefaultLayoutItem leftLayout = (DefaultLayoutItem) e.next();
DefaultLayoutItem rightLayout = (DefaultLayoutItem) e.next();
if (leftLayout != null) {
try {
DataViewer viewer;
StructureLayoutItem structureLayout = new StructureLayoutItem();
if (isEditor()) {
viewer = factory.createViewer(new StructEditorCreator(), getModel());
} else {
viewer = factory.createViewer(new StructViewerCreator(), getModel());
}
structureLayout.append(leftLayout);
viewer.setLayout(structureLayout);
getJSplitPane().setLeftComponent(viewer.getJComponent());
} catch (Exception ex1) {
ex1.printStackTrace();
}
}
if (rightLayout != null) {
try {
DataViewer viewer;
StructureLayoutItem structureLayout = new StructureLayoutItem();
if (isEditor()) {
viewer = factory.createViewer(new StructEditorCreator(), getModel());
} else {
viewer = factory.createViewer(new StructViewerCreator(), getModel());
}
structureLayout.append(rightLayout);
viewer.setLayout(structureLayout);
getJSplitPane().setRightComponent(viewer.getJComponent());
} catch (Exception ex1) {
ex1.printStackTrace();
}