use of org.gephi.visualization.scheduler.CompatibilityScheduler in project gephi by gephi.
the class VizController method initInstances.
public void initInstances() {
vizConfig = new VizConfig();
graphIO = new StandardGraphIO();
engine = new CompatibilityEngine();
vizEventManager = new StandardVizEventManager();
scheduler = new CompatibilityScheduler();
limits = new GraphLimits();
dataBridge = new DataBridge();
textManager = new TextManager();
screenshotMaker = new ScreenshotMaker();
currentModel = new VizModel(true);
selectionManager = new SelectionManager();
if (vizConfig.isUseGLJPanel()) {
//No more supported
} else if (Utilities.isMac()) {
drawable = createCanvas();
} else {
drawable = createNewtCanvas();
}
drawable.initArchitecture();
engine.initArchitecture();
((CompatibilityScheduler) scheduler).initArchitecture();
((StandardGraphIO) graphIO).initArchitecture();
dataBridge.initArchitecture();
textManager.initArchitecture();
screenshotMaker.initArchitecture();
vizEventManager.initArchitecture();
selectionManager.initArchitecture();
ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
pc.addWorkspaceListener(new WorkspaceListener() {
@Override
public void initialize(Workspace workspace) {
if (workspace.getLookup().lookup(VizModel.class) == null) {
workspace.add(new VizModel(workspace));
}
}
@Override
public void select(Workspace workspace) {
engine.reinit();
}
@Override
public void unselect(Workspace workspace) {
}
@Override
public void close(Workspace workspace) {
}
@Override
public void disable() {
engine.reinit();
}
});
if (pc.getCurrentWorkspace() != null) {
engine.reinit();
}
}
Aggregations