use of org.gephi.layout.spi.Layout in project gephi by gephi.
the class LayoutModelImpl method setSelectedLayout.
protected void setSelectedLayout(Layout selectedLayout) {
Layout oldValue = this.selectedLayout;
this.selectedLayout = selectedLayout;
this.selectedBuilder = selectedLayout != null ? selectedLayout.getBuilder() : null;
if (oldValue != null) {
saveProperties(oldValue);
}
injectGraph();
if (selectedLayout != null) {
loadProperties(selectedLayout);
}
firePropertyChangeEvent(SELECTED_LAYOUT, oldValue, selectedLayout);
}
use of org.gephi.layout.spi.Layout in project gephi by gephi.
the class LayoutModelImpl method getLayout.
@Override
public Layout getLayout(LayoutBuilder layoutBuilder) {
Layout layout = layoutBuilder.buildLayout();
GraphController graphController = Lookup.getDefault().lookup(GraphController.class);
GraphModel graphModel = graphController.getGraphModel(workspace);
layout.setGraphModel(graphModel);
selectedBuilder = layoutBuilder;
layout.resetPropertiesValues();
return layout;
}
Aggregations