use of org.gephi.preview.api.PreviewModel in project gephi by gephi.
the class RendererManager method restoreRenderersList.
/**
* Restores the original order of the renderers list, preserving their enabled state.
*/
private void restoreRenderersList() {
PreviewModel model = previewController.getModel();
Set<Renderer> enabledRenderers = null;
if (model != null && model.getManagedRenderers() != null) {
enabledRenderers = new HashSet<>();
enabledRenderers.addAll(Arrays.asList(model.getManagedEnabledRenderers()));
}
renderersList.clear();
for (Renderer r : previewController.getRegisteredRenderers()) {
renderersList.add(new RendererCheckBox(r, enabledRenderers == null || enabledRenderers.contains(r)));
}
updateModelManagedRenderers();
}
Aggregations