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);