当前位置: 首页>>代码示例>>Java>>正文


Java CyLayoutAlgorithmManager类代码示例

本文整理汇总了Java中org.cytoscape.view.layout.CyLayoutAlgorithmManager的典型用法代码示例。如果您正苦于以下问题:Java CyLayoutAlgorithmManager类的具体用法?Java CyLayoutAlgorithmManager怎么用?Java CyLayoutAlgorithmManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


CyLayoutAlgorithmManager类属于org.cytoscape.view.layout包,在下文中一共展示了CyLayoutAlgorithmManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: updateView

import org.cytoscape.view.layout.CyLayoutAlgorithmManager; //导入依赖的package包/类
public static void updateView(CyNetworkView view, String layoutAlgorName){
    CyAppAdapter appAdapter = CyActivator.getCyAppAdapter();
    CyLayoutAlgorithmManager alMan = appAdapter.getCyLayoutAlgorithmManager();
    CyLayoutAlgorithm algor = null;
    if (layoutAlgorName == null) {
        algor = alMan.getDefaultLayout(); // default grid layout
    } else{
        algor = alMan.getLayout(layoutAlgorName);
    }
    if(algor == null){
        algor = alMan.getDefaultLayout();
        throw new IllegalArgumentException ("No such algorithm found '" + layoutAlgorName + "'.");
    }
    TaskIterator itr = algor.createTaskIterator(view,algor.createLayoutContext(),CyLayoutAlgorithm.ALL_NODE_VIEWS,null);
    appAdapter.getTaskManager().execute(itr);// We use the synchronous task manager otherwise the visual style and updateView() may occur before the view is relayed out:
    SynchronousTaskManager<?> synTaskMan = appAdapter.getCyServiceRegistrar().getService(SynchronousTaskManager.class);           
    synTaskMan.execute(itr); 
    view.updateView(); // update view layout part
    appAdapter.getVisualMappingManager().getVisualStyle(view).apply(view); // update view style part
}
 
开发者ID:srikanthBezawada,项目名称:AdjacencyMatrixExporter,代码行数:21,代码来源:ReaderView.java

示例2: start

import org.cytoscape.view.layout.CyLayoutAlgorithmManager; //导入依赖的package包/类
@Override
public void start(BundleContext context) throws Exception {
	
	CyApplicationManager cyApplicationManager = getService(context, CyApplicationManager.class);
	CySwingApplication cySwingApplication = getService(context, CySwingApplication.class);
	CyNetworkFactory cyNetworkFactory = getService(context, CyNetworkFactory.class);
	CyNetworkManager cyNetMgr = getService(context,CyNetworkManager.class);
	CyTableFactory tableFactory = getService(context, CyTableFactory.class);
	CyNetworkViewManager cyNetViewMgr = getService(context, CyNetworkViewManager.class);
	DialogTaskManager diagTaskManager = getService(context, DialogTaskManager.class);
	CyNetworkViewFactory cyNetworkViewFactory = getService(context, CyNetworkViewFactory.class);
	CyLayoutAlgorithmManager cyLayoutAlgorithmMgr = getService(context,CyLayoutAlgorithmManager.class);
	VisualMappingManager visualMappingMgr = getService(context,VisualMappingManager.class);
	
	plugin = new Plugin(cyApplicationManager,cySwingApplication,cyNetworkFactory,tableFactory,cyNetMgr,cyNetViewMgr,diagTaskManager,cyNetworkViewFactory,cyLayoutAlgorithmMgr,visualMappingMgr);
			
	ConnectInstanceMenuAction connectAction = new ConnectInstanceMenuAction(cyApplicationManager,plugin);	
	SyncUpMenuAction syncUpAction = new SyncUpMenuAction(cyApplicationManager, plugin);
	SyncDownMenuAction syncDownAction = new SyncDownMenuAction(cyApplicationManager, plugin);
	
	registerAllServices(context, connectAction, new Properties());
	registerAllServices(context, syncUpAction, new Properties());
	registerAllServices(context, syncDownAction, new Properties());
	
}
 
开发者ID:gsummer,项目名称:cyNeo4j,代码行数:26,代码来源:CyActivator.java

示例3: SyncDownTaskFactory

import org.cytoscape.view.layout.CyLayoutAlgorithmManager; //导入依赖的package包/类
public SyncDownTaskFactory(CyNetworkManager cyNetworkMgr,
		boolean mergeInCurrent, CyNetworkFactory cyNetworkFactory,
		String instanceLocation, String cypherURL,
		String auth,
		CyNetworkViewManager cyNetworkViewMgr,
		CyNetworkViewFactory cyNetworkViewFactory,
		CyLayoutAlgorithmManager cyLayoutAlgorithmMgr,
		VisualMappingManager visualMappingMgr) {
	super();
	this.cyNetworkMgr = cyNetworkMgr;
	this.mergeInCurrent = mergeInCurrent;
	this.cyNetworkFactory = cyNetworkFactory;
	this.instanceLocation = instanceLocation;
	this.cypherURL = cypherURL;
	this.auth = auth;
	this.cyNetworkViewMgr = cyNetworkViewMgr;
	this.cyNetworkViewFactory = cyNetworkViewFactory;
	this.cyLayoutAlgorithmMgr = cyLayoutAlgorithmMgr;
	this.visualMappingMgr = visualMappingMgr;
}
 
开发者ID:gsummer,项目名称:cyNeo4j,代码行数:21,代码来源:SyncDownTaskFactory.java

示例4: SyncDownTask

import org.cytoscape.view.layout.CyLayoutAlgorithmManager; //导入依赖的package包/类
public SyncDownTask(boolean mergeInCurrent, String cypherURL,
		String instanceLocation, 
		String auth,
		CyNetworkFactory cyNetworkFactory,
		CyNetworkManager cyNetworkMgr,
		CyNetworkViewManager cyNetworkViewMgr,
		CyNetworkViewFactory cyNetworkViewFactory,
		CyLayoutAlgorithmManager cyLayoutAlgorithmMgr,
		VisualMappingManager visualMappingMgr) {
	super();
	this.mergeInCurrent = mergeInCurrent;
	this.cypherURL = cypherURL;
	this.instanceLocation = instanceLocation;
	this.auth = auth;
	this.cyNetworkFactory = cyNetworkFactory;
	this.cyNetworkMgr = cyNetworkMgr;
	this.cyNetworkViewMgr = cyNetworkViewMgr;
	this.cyNetworkViewFactory = cyNetworkViewFactory;
	this.cyLayoutAlgorithmMgr = cyLayoutAlgorithmMgr;
	this.visualMappingMgr = visualMappingMgr;
}
 
开发者ID:gsummer,项目名称:cyNeo4j,代码行数:22,代码来源:SyncDownTask.java

示例5: configure

import org.cytoscape.view.layout.CyLayoutAlgorithmManager; //导入依赖的package包/类
@Override
protected void configure() {
	// Bind cytoscape OSGi services
	bindService(CyServiceRegistrar.class);
	bindService(CyApplicationManager.class);
	bindService(CySwingApplication.class);
	bindService(CyNetworkManager.class);
	bindService(CyNetworkViewFactory.class);
	bindService(CyNetworkViewManager.class);
	bindService(CyNetworkFactory.class);
	bindService(IconManager.class);
	bindService(CyLayoutAlgorithmManager.class);
	bindService(CyGroupManager.class);
	bindService(CyGroupFactory.class);
	bindService(CyGroupAggregationManager.class);
	bindService(CyGroupSettingsManager.class);
	bindService(AvailableCommands.class);
	bindService(CommandExecutorTaskFactory.class);
	bindService(CySessionManager.class);
	bindService(CyEventHelper.class);
	bindService(OpenBrowser.class);
	bindService(VisualMappingManager.class);
	bindService(CyNetworkTableManager.class);
	bindService(CyTableManager.class);
	bindService(CyTableFactory.class);
	bindService(FileUtil.class);
	bindService(CyRootNetworkManager.class);
	
	bindService(DialogTaskManager.class);
	TypeLiteral<SynchronousTaskManager<?>> synchronousManager = new TypeLiteral<SynchronousTaskManager<?>>(){};
	bind(synchronousManager).toProvider(service(synchronousManager).single());
	
	bindService(AnnotationManager.class);
	TypeLiteral<AnnotationFactory<ShapeAnnotation>> shapeFactory = new TypeLiteral<AnnotationFactory<ShapeAnnotation>>(){};
	bind(shapeFactory).toProvider(service(shapeFactory).filter(ldap("(type=ShapeAnnotation.class)")).single());
	TypeLiteral<AnnotationFactory<TextAnnotation>> textFactory = new TypeLiteral<AnnotationFactory<TextAnnotation>>(){};
	bind(textFactory).toProvider(service(textFactory).filter(ldap("(type=TextAnnotation.class)")).single());
}
 
开发者ID:BaderLab,项目名称:AutoAnnotateApp,代码行数:39,代码来源:CytoscapeServiceModule.java

示例6: CyServices

import org.cytoscape.view.layout.CyLayoutAlgorithmManager; //导入依赖的package包/类
public CyServices(CySwingApplication cySwingApplication,
		TaskManager taskManager, OpenBrowser openBrowser,
		CyNetworkManager networkManager,
		CyApplicationManager applicationManager,
		CyNetworkViewManager networkViewManager,
		CyNetworkReaderManager networkViewReaderManager,
		CyNetworkNaming naming, CyNetworkFactory networkFactory,
		CyLayoutAlgorithmManager layoutManager, UndoSupport undoSupport,
		VisualMappingManager mappingManager,
		CyProperty<Properties> cyProperty,
		CyNetworkViewFactory networkViewFactory,
		CyRootNetworkManager rootNetworkManager ) 
{
	this.cySwingApplication = cySwingApplication;
	this.taskManager = taskManager;
	this.openBrowser = openBrowser;
	this.networkManager = networkManager;
	this.applicationManager = applicationManager;
	this.networkViewManager = networkViewManager;
	this.networkViewReaderManager = networkViewReaderManager;
	this.naming = naming;
	this.networkFactory = networkFactory;
	this.layoutManager = layoutManager;
	this.undoSupport = undoSupport;
	this.mappingManager = mappingManager;
	this.cyProperty = cyProperty;
	this.networkViewFactory = networkViewFactory;
	this.rootNetworkManager = rootNetworkManager;
}
 
开发者ID:cytoscape,项目名称:biopax,代码行数:30,代码来源:CyServices.java

示例7: Plugin

import org.cytoscape.view.layout.CyLayoutAlgorithmManager; //导入依赖的package包/类
public Plugin(CyNetworkFactory cyNetFct, 
		CyNetworkManager cyNetMgr, 
		DialogTaskManager dialogTaskManager, 
		CyNetworkViewFactory networkViewFactory,
		VisualMappingManager vmmServiceRef, 
		VisualStyleFactory visualStyleFactoryServiceRef, 
		VisualMappingFunctionFactory vmfFactoryC, 
		VisualMappingFunctionFactory vmfFactoryD, 
		VisualMappingFunctionFactory vmfFactoryP, 
		CyLayoutAlgorithmManager cyAlgorithmManager, 
		CyApplicationManager cyApplicationManager,
		CyNetworkViewManager cyNetworkViewManager,
		CySwingApplication cySwingApplication) {
	
	extensionManager = new HashMap<CyNetwork, ExtensionManager>();
	this.cyNetworkFactory = cyNetFct;
	this.cyNetworkManager = cyNetMgr;
	this.dialogTaskManager = dialogTaskManager;
	this.cyNetworkViewFactory = networkViewFactory;
	this.visualMappingManager = vmmServiceRef;
	this.visualStyleFactory = visualStyleFactoryServiceRef;
	this.visualMappingFunctionFactoryContinous = vmfFactoryC;
	this.visualMappingFunctionFactoryDiscrete = vmfFactoryD;
	this.visualMappingFunctionFactoryPassthrough = vmfFactoryP;
	this.cyLayoutAlgorithmManager = cyAlgorithmManager;
	this.cyApplicationManager = cyApplicationManager;
	this.cyNetworkViewManager = cyNetworkViewManager;
	this.cySwingApplication = cySwingApplication;
}
 
开发者ID:CyTargetLinker,项目名称:cytargetlinker,代码行数:30,代码来源:Plugin.java

示例8: start

import org.cytoscape.view.layout.CyLayoutAlgorithmManager; //导入依赖的package包/类
@Override
public void start(BundleContext context) throws Exception {
	CyApplicationManager cyApplicationManager = getService(context, CyApplicationManager.class);
	CyNetworkViewFactory networkViewFactory = getService(context, CyNetworkViewFactory.class);
	CyNetworkFactory networkFactory = getService(context, CyNetworkFactory.class);
	CyNetworkManager networkManager = getService(context, CyNetworkManager.class);
	DialogTaskManager dialogTaskManager = getService(context, DialogTaskManager.class);
	VisualMappingManager vmmServiceRef = getService(context,VisualMappingManager.class);
	VisualStyleFactory visualStyleFactoryServiceRef = getService(context,VisualStyleFactory.class);
	VisualMappingFunctionFactory vmfFactoryC = getService(context,VisualMappingFunctionFactory.class, "(mapping.type=continuous)");
	VisualMappingFunctionFactory vmfFactoryD = getService(context,VisualMappingFunctionFactory.class, "(mapping.type=discrete)");
	VisualMappingFunctionFactory vmfFactoryP = getService(context,VisualMappingFunctionFactory.class, "(mapping.type=passthrough)");
	CyLayoutAlgorithmManager cyAlgorithmManager = getService(context, CyLayoutAlgorithmManager.class);
	CyNetworkViewManager cyNetworkViewManager = getService(context, CyNetworkViewManager.class);
	CySwingApplication cySwingApplication = getService(context, CySwingApplication.class);
	OpenBrowser openBrowser = getService(context, OpenBrowser.class);
					
	Plugin plugin = new Plugin(networkFactory, networkManager, dialogTaskManager, networkViewFactory, vmmServiceRef, visualStyleFactoryServiceRef,
			vmfFactoryC, vmfFactoryD, vmfFactoryP, cyAlgorithmManager, cyApplicationManager, cyNetworkViewManager, cySwingApplication);
	registerService(context, plugin, NetworkDestroyedListener.class, new Properties());
	
	// CyTargetLinker implements two actions: extend network and help
	ExtensionAction extAction = new ExtensionAction("Extend network", plugin);
	registerAllServices(context, extAction, new Properties());
	
	HelpAction helpAction = new HelpAction("Help", openBrowser);
	registerAllServices(context, helpAction, new Properties());
	
	// property stores last used RegIN directory
	CyTargetLinkerProperty property = new CyTargetLinkerProperty();
	CyProperty<Properties> prop = property.checkCyProperties(getService(context, CySessionManager.class));
	registerService(context, prop, CyProperty.class, new Properties());
	
	// registers the panel for CyTargetLinker
	CyTargetLinkerPanel panel = new CyTargetLinkerPanel(plugin);
	registerService(context, panel, CytoPanelComponent.class, new Properties());
}
 
开发者ID:CyTargetLinker,项目名称:cytargetlinker,代码行数:38,代码来源:CyActivator.java

示例9: CyServices

import org.cytoscape.view.layout.CyLayoutAlgorithmManager; //导入依赖的package包/类
public CyServices(CySwingApplication cySwingApplication,
			TaskManager taskManager, OpenBrowser openBrowser,
			CyNetworkManager networkManager,
			CyApplicationManager applicationManager,
			CyNetworkViewManager networkViewManager,
//			CyNetworkReaderManager networkViewReaderManager,
			CyNetworkNaming naming, CyNetworkFactory networkFactory,
			CyLayoutAlgorithmManager layoutManager, UndoSupport undoSupport,
			VisualMappingManager mappingManager,
			CyProperty<Properties> cyProperty,
			CyRootNetworkManager rootNetworkManager, 
			UnHideAllEdgesTaskFactory unHideAllEdgesTaskFactory,
			CyNetworkViewFactory networkViewFactory,
			VisualStyleFactory visualStyleFactory,
			VisualMappingFunctionFactory discreteMappingFunctionFactory,
			VisualMappingFunctionFactory passthroughMappingFunctionFactory,
			StreamUtil streamUtil
	) {
		this.cySwingApplication = cySwingApplication;
		this.taskManager = taskManager;
		this.openBrowser = openBrowser;
		this.networkManager = networkManager;
		this.applicationManager = applicationManager;
		this.networkViewManager = networkViewManager;
//		this.networkViewReaderManager = networkViewReaderManager;
		this.naming = naming;
		this.networkFactory = networkFactory;
		this.layoutManager = layoutManager;
		this.undoSupport = undoSupport;
		this.mappingManager = mappingManager;
		this.cyProperty = cyProperty;
		this.networkViewFactory = networkViewFactory;
		this.rootNetworkManager = rootNetworkManager;
		this.unHideAllEdgesTaskFactory = unHideAllEdgesTaskFactory;
		this.visualStyleFactory = visualStyleFactory;
		this.discreteMappingFunctionFactory = discreteMappingFunctionFactory;
		this.passthroughMappingFunctionFactory = passthroughMappingFunctionFactory;
		this.streamUtil = streamUtil;
	}
 
开发者ID:PathwayCommons,项目名称:CyPath2,代码行数:40,代码来源:CyServices.java

示例10: start

import org.cytoscape.view.layout.CyLayoutAlgorithmManager; //导入依赖的package包/类
public void start(BundleContext bc) {

		CySwingApplication cySwingApplication = getService(bc,CySwingApplication.class);
		OpenBrowser openBrowser = getService(bc,OpenBrowser.class);
		CyApplicationManager cyApplicationManager = getService(bc,CyApplicationManager.class);
		CyNetworkViewManager cyNetworkViewManager = getService(bc,CyNetworkViewManager.class);
		CyNetworkManager cyNetworkManager = getService(bc,CyNetworkManager.class);
		CyNetworkNaming cyNetworkNaming = getService(bc,CyNetworkNaming.class);
		CyNetworkFactory cyNetworkFactory = getService(bc,CyNetworkFactory.class);
		StreamUtil streamUtil = getService(bc,StreamUtil.class);
		VisualMappingManager visualMappingManager = getService(bc,VisualMappingManager.class);
		VisualStyleFactory visualStyleFactory = getService(bc,VisualStyleFactory.class);
		VisualMappingFunctionFactory discreteMappingFunctionFactory =
				getService(bc,VisualMappingFunctionFactory.class,"(mapping.type=discrete)");
		VisualMappingFunctionFactory passthroughMappingFunctionFactory =
				getService(bc,VisualMappingFunctionFactory.class,"(mapping.type=passthrough)");
		CyLayoutAlgorithmManager cyLayoutAlgorithmManager = getService(bc,CyLayoutAlgorithmManager.class);	
		TaskManager taskManager = getService(bc, DialogTaskManager.class);
		CyProperty<Properties> cyProperties = getService(bc, CyProperty.class, "(cyPropertyName=cytoscape3.props)");
		CyRootNetworkManager cyRootNetworkManager = getService(bc,CyRootNetworkManager.class);
		CyNetworkReaderManager cyNetworkReaderManager = getService(bc,CyNetworkReaderManager.class);
		UndoSupport undoSupport = getService(bc,UndoSupport.class);
		CyNetworkViewFactory networkViewFactory = getService(bc, CyNetworkViewFactory.class);
		
		
		// keep all the service references in one place -
		final CyServices cyServices = new CyServices(cySwingApplication, taskManager, openBrowser, 
				cyNetworkManager, cyApplicationManager, cyNetworkViewManager, cyNetworkReaderManager, 
				cyNetworkNaming, cyNetworkFactory, cyLayoutAlgorithmManager, undoSupport, visualMappingManager, 
				cyProperties, networkViewFactory, cyRootNetworkManager);
				
		BioPaxFilter bioPaxFilter = new BioPaxFilter(streamUtil);
				
		VisualStyleUtil visualStyleUtil = new VisualStyleUtil(visualStyleFactory,
				visualMappingManager, discreteMappingFunctionFactory, passthroughMappingFunctionFactory);
		visualStyleUtil.init(); //important

		// create the biopax reader object
		BioPaxReader biopaxReader = new BioPaxReader(bioPaxFilter, cyServices, visualStyleUtil);		
		// register/export osgi services
		Properties props = new Properties();
		props.setProperty("readerDescription","BioPAX reader");
		props.setProperty("readerId","biopaxNetworkReader");
		registerAllServices(bc, biopaxReader, props);

		System.setProperty("paxtools.CollectionsProvider","org.biopax.paxtools.trove.TProvider");

		//TODO move the CytoPanelComponent (results panel) and related code from CyPath2 app to here...
	}
 
开发者ID:cytoscape,项目名称:biopax,代码行数:50,代码来源:CyActivator.java

示例11: KddnExperiment

import org.cytoscape.view.layout.CyLayoutAlgorithmManager; //导入依赖的package包/类
/**
    * Constructor
    * @param cyNetworkManagerServiceRef
    * @param cyNetworkNamingServiceRef
    * @param cyNetworkFactoryServiceRef
    * @param networkViewFactory
    * @param networkViewManager
    * @param vmmServiceRef
    * @param vsfServiceRef
    * @param vmfFactoryC
    * @param vmfFactoryD
    * @param vmfFactoryP
    * @param clamRef
    * @param varList
    * @param data1
    * @param data2
    * @param priorKnowledge
    * @param useKnowledge
    * @param lambda1
    * @param lambda2
    * @param alpha
    * @param theta
    * @param delta
    * @param needPvalue
    * @param numPermutation
    * @param twoCondition
    * @param dataPanel
    * @param parameterPanel
    */
public KddnExperiment(CyNetworkManager cyNetworkManagerServiceRef,
		CyNetworkNaming cyNetworkNamingServiceRef, 
		CyNetworkFactory cyNetworkFactoryServiceRef, 
		CyNetworkViewFactory networkViewFactory, 
		CyNetworkViewManager networkViewManager,
		VisualMappingManager vmmServiceRef, 
		VisualStyleFactory vsfServiceRef, 
		VisualMappingFunctionFactory vmfFactoryC, 
		VisualMappingFunctionFactory vmfFactoryD, 
		VisualMappingFunctionFactory vmfFactoryP,
		CyLayoutAlgorithmManager clamRef, 
		String[] varList, double[][] data1, double[][] data2, 
		String[][] priorKnowledge, boolean useKnowledge, 
		double lambda1, double lambda2, 
		double alpha, double theta, double delta, boolean needPvalue,
		int numPermutation, boolean twoCondition, 
		KddnDataPanel dataPanel, KddnParameterPanel parameterPanel) {
	
	this.cyNetworkFactoryServiceRef = cyNetworkFactoryServiceRef;
	this.cyNetworkManagerServiceRef = cyNetworkManagerServiceRef;
	this.cyNetworkNamingServiceRef = cyNetworkNamingServiceRef;
	this.networkViewFactory = networkViewFactory;
	this.networkViewManager = networkViewManager;
	this.vmmServiceRef = vmmServiceRef;
	this.vsfServiceRef = vsfServiceRef;
	this.vmfFactoryC = vmfFactoryC;
	this.vmfFactoryD = vmfFactoryD;
	this.vmfFactoryP = vmfFactoryP;
	this.clamRef = clamRef;
	this.varList = varList;
	this.data1 = data1;	
	this.priorKnowledge = priorKnowledge;
	this.useKnowledge = useKnowledge;
	this.numPermutation = numPermutation;
	this.lambda1 = lambda1;
	this.lambda2 = lambda2;
	this.theta = theta;
	this.alpha = alpha;
	this.delta = delta;
	this.needPvalue = needPvalue;
	this.twoCondition = twoCondition;
	if(!twoCondition)
		this.data2 = data1;
	else
		this.data2 = data2;
	
	this.dataPanel = dataPanel;
	this.parameterPanel = parameterPanel;
}
 
开发者ID:tianye03,项目名称:kddn-cytoscape,代码行数:79,代码来源:KddnExperiment.java

示例12: start

import org.cytoscape.view.layout.CyLayoutAlgorithmManager; //导入依赖的package包/类
@Override
public void start(BundleContext bc) throws Exception {
	
	CySwingApplication cytoscapeDesktopService = getService(bc,CySwingApplication.class);

	// register visualization related managers to Cytoscape
	// network creation
	CyNetworkManager cyNetworkManagerServiceRef = getService(bc,CyNetworkManager.class);
	CyNetworkNaming cyNetworkNamingServiceRef = getService(bc,CyNetworkNaming.class);
	CyNetworkFactory cyNetworkFactoryServiceRef = getService(bc,CyNetworkFactory.class);
	
	// progress dialog
	DialogTaskManager dialogTaskManager = getService(bc, DialogTaskManager.class);
	
	// view creation
	CyNetworkViewFactory networkViewFactory = getService(bc, CyNetworkViewFactory.class);
	CyNetworkViewManager networkViewManager = getService(bc, CyNetworkViewManager.class);
 
	// visual style manager
	VisualMappingManager vmmServiceRef = getService(bc,VisualMappingManager.class);
	VisualStyleFactory vsfServiceRef = getService(bc,VisualStyleFactory.class);

	// visual mapping functions
	VisualMappingFunctionFactory vmfFactoryC = getService(bc,VisualMappingFunctionFactory.class, "(mapping.type=continuous)");
	VisualMappingFunctionFactory vmfFactoryD = getService(bc,VisualMappingFunctionFactory.class, "(mapping.type=discrete)");
	VisualMappingFunctionFactory vmfFactoryP = getService(bc,VisualMappingFunctionFactory.class, "(mapping.type=passthrough)");

	// layout manager
	CyLayoutAlgorithmManager clamRef = getService(bc, CyLayoutAlgorithmManager.class);
	
	// main control panel added to the left of Cytoscape panel
	kddnConfigurePanel = new KddnConfigurePanel(cyNetworkManagerServiceRef,
			cyNetworkNamingServiceRef,cyNetworkFactoryServiceRef,
			dialogTaskManager, networkViewFactory, networkViewManager,
			vmmServiceRef, vsfServiceRef, vmfFactoryC,
			vmfFactoryD, vmfFactoryP, clamRef);
	registerService(bc,kddnConfigurePanel,CytoPanelComponent.class, new Properties());
	
	// results panel added to the right of Cytoscape panel
	kddnResultsPanel = new KddnResultsPanel(cytoscapeDesktopService);
	registerService(bc, kddnResultsPanel, CytoPanelComponent.class, new Properties());
	
	// menu items
	CyApplicationManager cyApplicationManager = getService(bc, CyApplicationManager.class);
	
	KddnMenuAction runMenu = new KddnMenuAction(cyApplicationManager, "Run analysis", cytoscapeDesktopService, kddnConfigurePanel);
	registerAllServices(bc, runMenu, new Properties());

	KddnMenuAction helpMenu = new KddnMenuAction(cyApplicationManager, "Help", cytoscapeDesktopService, kddnConfigurePanel);
	registerAllServices(bc, helpMenu, new Properties());
	
	KddnMenuAction aboutMenu = new KddnMenuAction(cyApplicationManager, "About", cytoscapeDesktopService, kddnConfigurePanel);
	registerAllServices(bc, aboutMenu, new Properties());
	
	// help doc
	cyHelpBroker = getService(bc, CyHelpBroker.class);

	final String HELP_SET_NAME = "/help/jhelpset";
	final ClassLoader classLoader = getClass().getClassLoader();
	URL helpSetURL;
	try {
		helpSetURL = HelpSet.findHelpSet(classLoader, HELP_SET_NAME);
		final HelpSet newHelpSet = new HelpSet(classLoader, helpSetURL);
		cyHelpBroker.getHelpSet().add(newHelpSet);
	} catch (final Exception e) {
		System.err.println("Could not find help set: \"" + HELP_SET_NAME + ".");
	}
}
 
开发者ID:tianye03,项目名称:kddn-cytoscape,代码行数:69,代码来源:CyActivator.java

示例13: KddnRunPanel

import org.cytoscape.view.layout.CyLayoutAlgorithmManager; //导入依赖的package包/类
public KddnRunPanel(CyNetworkManager cyNetworkManagerServiceRef, 
		CyNetworkNaming cyNetworkNamingServiceRef, 
		CyNetworkFactory cyNetworkFactoryServiceRef,
		DialogTaskManager dialogTaskManager, 
		CyNetworkViewFactory networkViewFactory,
		CyNetworkViewManager networkViewManager, 
		VisualMappingManager vmmServiceRef,
		VisualStyleFactory vsfServiceRef, 
		VisualMappingFunctionFactory vmfFactoryC, 
		VisualMappingFunctionFactory vmfFactoryD, 
		VisualMappingFunctionFactory vmfFactoryP,
		CyLayoutAlgorithmManager clamRef, 
		KddnParameterPanel parameterPanel, KddnDataPanel dataPanel, 
		KddnConfigurePanel kddnConfigurePanel) {
	
	this.cyNetworkFactoryServiceRef = cyNetworkFactoryServiceRef;
	this.cyNetworkManagerServiceRef = cyNetworkManagerServiceRef;
	this.cyNetworkNamingServiceRef = cyNetworkNamingServiceRef;
	this.networkViewFactory = networkViewFactory;
	this.dialogTaskManager = dialogTaskManager;
	this.networkViewManager = networkViewManager;
	this.vmmServiceRef = vmmServiceRef;
	this.vsfServiceRef = vsfServiceRef;
	this.vmfFactoryC = vmfFactoryC;
	this.vmfFactoryD = vmfFactoryD;
	this.vmfFactoryP = vmfFactoryP;
	this.clamRef = clamRef;
	this.parameterPanel = parameterPanel;
	this.dataPanel = dataPanel;
	this.kddnConfigurePanel = kddnConfigurePanel;
	
	this.setLayout(new BorderLayout(0,0));
	
	JPanel aPanel = new JPanel();
	aPanel.setLayout(new BorderLayout(0,0));
	
	// border for top panel
	Border border = BorderFactory.createEtchedBorder();
	String title = "Step 3: Running Options";
	TitledBorder titledBorder = BorderFactory.createTitledBorder(border, title,
			TitledBorder.LEFT, TitledBorder.TOP, new Font("titleFont", Font.BOLD, 12));
	aPanel.setBorder(titledBorder);
			
	permBox = new JCheckBox("Want differential edge p-value");
	aPanel.add(permBox, BorderLayout.NORTH);
	
	numpermLabel = new JLabel("Number of permutations:");
	numpermLabel.setEnabled(false);
	aPanel.add(numpermLabel, BorderLayout.WEST);
	
	numPerm = new JSpinner(numSpin);
	numPerm.setEnabled(false);
	aPanel.add(numPerm, BorderLayout.EAST);
	
	runButton = new JButton("Run KDDN");
	runButton.setHorizontalAlignment(SwingConstants.CENTER);
	runButton.setEnabled(false);
	aPanel.add(runButton, BorderLayout.SOUTH);
	runButton.addActionListener(this);
	
	permBox.addItemListener(this);
	
	this.add(aPanel, BorderLayout.NORTH);
}
 
开发者ID:tianye03,项目名称:kddn-cytoscape,代码行数:65,代码来源:KddnRunPanel.java

示例14: Plugin

import org.cytoscape.view.layout.CyLayoutAlgorithmManager; //导入依赖的package包/类
public Plugin(CyApplicationManager cyApplicationManager,
		CySwingApplication cySwingApplication,
		CyNetworkFactory cyNetworkFactory, CyTableFactory cyTableFactory,
		CyNetworkManager cyNetMgr, CyNetworkViewManager cyNetViewMgr,
		DialogTaskManager diagTaskManager,
		CyNetworkViewFactory cyNetworkViewFactory,
		CyLayoutAlgorithmManager cyLayoutAlgorithmMgr,
		VisualMappingManager visualMappingMgr) {
	super();
	
	/*
	 * This should eventually be replaced by a more modular system. Each of the extensions
	 * is its own Cytoscape app and this app just serves as a entry point for them?
	 */
	
	/*
	 * DEV ENTRY POINT 
	 * Link a name of a plugin on the server side with an action in the app!
	 * The linked action will be displayed in the cyNeo4j menu item if the plugin is available on the server
	 */
	Map<String,AbstractCyAction> localExtensions = new HashMap<String,AbstractCyAction>();
	localExtensions.put("neonetworkanalyzer",new NeoNetworkAnalyzerAction(cyApplicationManager, this));
	localExtensions.put("forceatlas2",new ForceAtlas2LayoutExtMenuAction(cyApplicationManager, this));
	localExtensions.put("circlelayout",new CircularLayoutExtMenuAction(cyApplicationManager, this));
	localExtensions.put("gridlayout",new GridLayoutExtMenuAction(cyApplicationManager, this));
	localExtensions.put("cypher",new CypherMenuAction(cyApplicationManager, this));
	
	
	this.cyApplicationManager = cyApplicationManager;
	this.cySwingApplication = cySwingApplication;
	this.cyNetworkFactory = cyNetworkFactory;
	this.cyTableFactory = cyTableFactory;
	this.cyNetMgr = cyNetMgr;
	this.cyNetViewMgr = cyNetViewMgr;
	this.diagTaskManager = diagTaskManager;
	this.cyNetworkViewFactory = cyNetworkViewFactory;
	this.cyLayoutAlgorithmMgr = cyLayoutAlgorithmMgr;
	this.visualMappingMgr = visualMappingMgr;
	
	interactor = new Neo4jRESTServer(this);
	interactor.setLocalSupportedExtension(localExtensions);
	
	registeredActions = new ArrayList<AbstractCyAction>();
}
 
开发者ID:gsummer,项目名称:cyNeo4j,代码行数:45,代码来源:Plugin.java

示例15: getCyLayoutAlgorithmManager

import org.cytoscape.view.layout.CyLayoutAlgorithmManager; //导入依赖的package包/类
public CyLayoutAlgorithmManager getCyLayoutAlgorithmManager() {
	return cyLayoutAlgorithmMgr;
}
 
开发者ID:gsummer,项目名称:cyNeo4j,代码行数:4,代码来源:Plugin.java


注:本文中的org.cytoscape.view.layout.CyLayoutAlgorithmManager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。