use of org.gephi.preview.api.ManagedRenderer in project gephi by gephi.
the class RendererManager method loadModelManagedRenderers.
/**
* Obtain renderers enabled state and order from the preview model.
*/
private void loadModelManagedRenderers() {
renderersList.clear();
PreviewModel model = previewController.getModel();
if (model != null) {
if (model.getManagedRenderers() != null) {
for (ManagedRenderer mr : model.getManagedRenderers()) {
renderersList.add(new RendererCheckBox(mr.getRenderer(), mr.isEnabled()));
}
} else {
restoreRenderersList();
}
}
}
use of org.gephi.preview.api.ManagedRenderer in project gephi by gephi.
the class RendererManager method updateModelManagedRenderers.
/**
* Sets current renderers enabled state and order to the preview model.
*/
private void updateModelManagedRenderers() {
PreviewModel model = previewController.getModel();
if (model != null) {
ArrayList<ManagedRenderer> managedRenderers = new ArrayList<>();
for (RendererCheckBox rendererCheckBox : renderersList) {
managedRenderers.add(new ManagedRenderer(rendererCheckBox.renderer, rendererCheckBox.isSelected()));
}
model.setManagedRenderers(managedRenderers.toArray(new ManagedRenderer[0]));
}
}
Aggregations