@Override
public void run() {
+ nodeMap.setChangeTracking(false);
nodeMap.populate();
+ nodeMap.setChangeTracking(true);
panel.addListener(new RenderListener() {
-
- @Override
- public void preRender() {
-
- }
-
- @Override
- public void postRender() {
- panel.removeListener(this);
-
- try {
- P3DUtil.finalizeDBLoad2(rootNode);
- if (nodeMap.isRangeModified());
- nodeMap.commit("Load sync");
- } catch (Exception e) {
- ExceptionUtils.logAndShowError("Failed to load model correctly", e);
- }
-
- List<vtkProp3D> props = new ArrayList<>();
- collectProps(rootNode, props);
- fitToWindow(props);
- }
- });
+
+ @Override
+ public void preRender() {
+
+ }
+
+ @Override
+ public void postRender() {
+ panel.removeListener(this);
+
+ try {
+ P3DUtil.finalizeDBLoad2(rootNode);
+ if (nodeMap.getMapping().isRangeModified())
+ nodeMap.commit("Load sync");
+ } catch (Exception e) {
+ ExceptionUtils.logAndShowError("Failed to load model correctly", e);
+ }
+
+ onEditorInitializationComplete();
+
+ List<vtkProp3D> props = new ArrayList<>();
+ collectProps(rootNode, props);
+ fitToWindow(props);
+ }
+ });
}
});
-
+
}
+ /**
+ * This can be overridden by clients to perform extra initialization tasks
+ */
+ protected void onEditorInitializationComplete() {
+ }
+
protected IMappingSchema<Resource, INode> getSchema(ReadGraph graph) throws DatabaseException {
IMappingSchema<Resource,INode> schema = SchemaBuilder.getSchema(graph);
return schema;