use of org.cytoscape.view.layout.internal.algorithms.GridNodeLayout in project cytoscape-impl by cytoscape.
the class CyActivator method start.
@Override
public void start(BundleContext bc) {
final CyServiceRegistrar serviceRegistrar = getService(bc, CyServiceRegistrar.class);
final UndoSupport undoSupport = getService(bc, UndoSupport.class);
GridNodeLayout gridNodeLayout = new GridNodeLayout(undoSupport);
CyLayoutAlgorithmManagerImpl layoutManager = new CyLayoutAlgorithmManagerImpl(gridNodeLayout, serviceRegistrar);
registerService(bc, layoutManager, CyLayoutAlgorithmManager.class, new Properties());
{
Properties props = new Properties();
// gridNodeLayoutProps.setProperty(PREFERRED_MENU, "Layout.Cytoscape Layouts");
props.setProperty("preferredTaskManager", "menu");
props.setProperty(TITLE, gridNodeLayout.toString());
props.setProperty(MENU_GRAVITY, "10.0");
registerService(bc, gridNodeLayout, CyLayoutAlgorithm.class, props);
}
registerServiceListener(bc, layoutManager::addLayout, layoutManager::removeLayout, CyLayoutAlgorithm.class);
}
use of org.cytoscape.view.layout.internal.algorithms.GridNodeLayout in project cytoscape-impl by cytoscape.
the class PerfTest method getLayouts.
private CyLayoutAlgorithmManager getLayouts() {
CyLayoutAlgorithm gridNodeLayout = new GridNodeLayout(null);
CyLayoutAlgorithmManagerImpl cyLayouts = new CyLayoutAlgorithmManagerImpl(gridNodeLayout, serviceRegistrar);
return cyLayouts;
}
Aggregations