• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java CyAction类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: registerMenu

import org.cytoscape.application.swing.CyAction; //导入依赖的package包/类
public void registerMenu(BundleContext context, String parentMenu, AbstractAction action)
{

	// Configure the service properties first.
	Properties properties = new Properties();

	// Our task should be exposed in the "Apps" menu...
	properties.put(ServiceProperties.PREFERRED_MENU,
			parentMenu);

	String title = "" + action.getValue(AbstractAction.NAME);

	// ... as a sub menu item called "Say Hello".
	properties.put(ServiceProperties.TITLE, title);

	// Our menu item should only be enabled if at least one network
	// view exists.
	//		properties.put(ServiceProperties.ENABLE_FOR, "networkAndView");

	registerService(context, new ActionWrapper(action, parentMenu), CyAction.class, properties);
}
 
开发者ID:generalbioinformatics,项目名称:general-sparql-cy3,代码行数:22,代码来源:CyActivator.java


示例2: start

import org.cytoscape.application.swing.CyAction; //导入依赖的package包/类
@Override
public void start(BundleContext context) throws Exception {
	CyApplicationManager manager = getService(context, CyApplicationManager.class);
	CySwingAppAdapter adapter = getService(context, CySwingAppAdapter.class);
	CySwingApplication desktopApp = adapter.getCySwingApplication();
       OpenBrowser openBrowser = getService(context,OpenBrowser.class);
       CyEventHelper eventHelper = getService(context, CyEventHelper.class);
       CyNetworkFactory networkFactory = getService(context, CyNetworkFactory.class);
       CyNetworkManager networkManager = getService(context, CyNetworkManager.class);
       CyNetworkViewFactory networkViewFactory = getService(context, CyNetworkViewFactory.class);
       CyNetworkViewManager networkViewManager = getService(context, CyNetworkViewManager.class);
       VisualMappingManager visualMappingManager = getService(context,VisualMappingManager.class);

	Properties properties = new Properties();

	SlimPanel slimPanel = new SlimPanel(manager, adapter, openBrowser, eventHelper, networkFactory, networkManager,
               networkViewFactory, networkViewManager, visualMappingManager);
	registerService(context, slimPanel, CytoPanelComponent.class, properties);

	SlimscapePluginAction slimscapePluginAction = new SlimscapePluginAction(manager, adapter, desktopApp, slimPanel);
	registerService(context, slimscapePluginAction, CyAction.class, properties);
}
 
开发者ID:passeridae,项目名称:SLiMscape,代码行数:23,代码来源:CyActivator.java


示例3: start

import org.cytoscape.application.swing.CyAction; //导入依赖的package包/类
@Override
public void start(BundleContext context) throws Exception {
    CyApplicationManager applicationManager = getService(context, CyApplicationManager.class);
    CySwingApplication swingApplication = getService(context, CySwingApplication.class);
    CyServiceRegistrar serviceRegistrar = getService(context, CyServiceRegistrar.class);
    VisualMappingManager visualMappingManager = getService(context, VisualMappingManager.class);
    VizmapReaderManager vizmapReaderManager = getService(context, VizmapReaderManager.class);
    TaskManager taskManager = getService(context, TaskManager.class);
    
    CySwing.init(swingApplication, serviceRegistrar); 
    NetworkController.init(applicationManager, visualMappingManager);
    
    // UI controls
    MenuAction menuAction = new MenuAction(taskManager);
    registerService(context, menuAction, CyAction.class, new Properties());


    taskManager.execute(new TaskIterator(new ImportGFDNetVisualStylesTask(visualMappingManager, vizmapReaderManager)));
    
    serviceRegistrar.registerService(new ClickOnViewListener(), RowsSetListener.class, new Properties());
    serviceRegistrar.registerService(new NetworkClosedListener(), NetworkAboutToBeDestroyedListener.class, new Properties());
}
 
开发者ID:juanjoDiaz,项目名称:gfdnet,代码行数:23,代码来源:GFDnet.java


示例4: start

import org.cytoscape.application.swing.CyAction; //导入依赖的package包/类
@Override
public void start(final BundleContext bundleContext)
{
    if (bundleContext == null)
    {
        throw new NullPointerException("bundleContext must not be null");
    }
    CyApplicationManager applicationManager = getService(bundleContext, CyApplicationManager.class);
    DialogTaskManager dialogTaskManager = getService(bundleContext, DialogTaskManager.class);
    VisualMappingManager visualMappingManager = getService(bundleContext, VisualMappingManager.class);
    VisualMappingFunctionFactory continuousMappingFactory = getService(bundleContext, VisualMappingFunctionFactory.class, "(mapping.type=continuous)");
    VisualMappingFunctionFactory discreteMappingFactory = getService(bundleContext, VisualMappingFunctionFactory.class, "(mapping.type=discrete)");
    VisualMappingFunctionFactory passthroughMappingFactory = getService(bundleContext, VisualMappingFunctionFactory.class, "(mapping.type=passthrough)");

    VariationAction variationAction = new VariationAction(applicationManager,
                                                          dialogTaskManager,
                                                          visualMappingManager,
                                                          continuousMappingFactory,
                                                          discreteMappingFactory,
                                                          passthroughMappingFactory);

    Properties properties = new Properties();
    registerService(bundleContext, variationAction, CyAction.class, properties);
}
 
开发者ID:heuermh,项目名称:variation-cytoscape3-app,代码行数:25,代码来源:CyActivator.java


示例5: TheNetworkSearchTaskFactory

import org.cytoscape.application.swing.CyAction; //导入依赖的package包/类
public TheNetworkSearchTaskFactory(CyAction showUI, App app) {
    super("pathwaycommons.cypath2", "Pathway Commons",
            "Search Pathway Commons, import a pathway or sub-network.",
            new ImageIcon(TheNetworkSearchTaskFactory.class.getResource("pc_logo.png")));

    this.action = showUI;
    this.app = app;
}
 
开发者ID:PathwayCommons,项目名称:CyPath2,代码行数:9,代码来源:TheNetworkSearchTaskFactory.java


示例6: start

import org.cytoscape.application.swing.CyAction; //导入依赖的package包/类
@Override
public void start(BundleContext context) throws Exception {

    CyApplicationManager applicationManager = getService(context, CyApplicationManager.class);
    CyNetworkViewManager networkViewManager = getService(context, CyNetworkViewManager.class);
    CyServiceRegistrar registrar = getService(context, CyServiceRegistrar.class);
    CySwingApplication application = getService(context, CySwingApplication.class);
    DialogTaskManager taskManager = getService(context, DialogTaskManager.class);
    CyTableManager tableManager = getService(context, CyTableManager.class);
    CyTableFactory tableFactory = getService(context, CyTableFactory.class);

    VisualMappingManager visualMappingManager = getService(context, VisualMappingManager.class);
    VisualStyleFactory visualStyleFactory = getService(context, VisualStyleFactory.class);

    VisualMappingFunctionFactory continuousMappingFactory = getService(context, VisualMappingFunctionFactory.class,
                                                                       "(mapping.type=continuous)");

    VisualMappingFunctionFactory passthroughMappingFactory = getService(context, VisualMappingFunctionFactory.class,
                                                                        "(mapping.type=passthrough)");

    StyleFactory styleFactory = new StyleFactory(visualStyleFactory, continuousMappingFactory,
                                                 passthroughMappingFactory);

    EventService eventService = new DefaultEventService();

    AttributeBrowserController attributeBrowser = new AttributeBrowserController(visualMappingManager, styleFactory,
                                                                                 eventService, taskManager);

    AnnotationChooserController annotationChooser = new AnnotationChooserController(application, taskManager);

    ImportPanelController importPanel = new ImportPanelController(taskManager, attributeBrowser, annotationChooser,
                                                                  eventService);

    DomainBrowserController domainBrowser = new DomainBrowserController(visualMappingManager, styleFactory,
                                                                        taskManager, eventService);

    CompositeMapController compositeMapPanel = new CompositeMapController(taskManager, domainBrowser, eventService);

    SafeSessionSerializer serializer = new SafeSessionSerializer(tableManager, tableFactory);

    SelectionTracker selectionTracker = new SelectionTracker(eventService);

    RedrawTracker redrawTracker = new RedrawTracker(eventService);

    SafeController safeController = new SafeController(registrar, application, applicationManager, importPanel,
                                                       attributeBrowser, compositeMapPanel, domainBrowser,
                                                       eventService, serializer, selectionTracker);

    Map<String, String> safeActionProperties = new MapBuilder().put("inMenuBar", "true")
                                                               .put("preferredMenu", ServiceProperties.APPS_MENU)
                                                               .build();
    SafeAction safeAction = new SafeAction(safeActionProperties, applicationManager, networkViewManager,
                                           safeController);
    safeAction.putValue(CyAction.NAME, "SAFE");

    registerService(context, safeAction, CyAction.class);
    registerService(context, safeController, SetCurrentNetworkViewListener.class,
                    NetworkViewAboutToBeDestroyedListener.class, ColumnCreatedListener.class,
                    ColumnDeletedListener.class, ColumnNameChangedListener.class, SessionLoadedListener.class,
                    SessionAboutToBeSavedListener.class);
    registerService(context, selectionTracker, RowsSetListener.class);
    registerService(context, redrawTracker, UpdateNetworkPresentationListener.class);
}
 
开发者ID:baryshnikova-lab,项目名称:safe-java,代码行数:64,代码来源:CyActivator.java


示例7: registerAction

import org.cytoscape.application.swing.CyAction; //导入依赖的package包/类
private void registerAction(BundleContext bc, AbstractCyAction action) {
	action.setPreferredMenu("Apps." + BuildProperties.APP_NAME);
	registerService(bc, action, CyAction.class, new Properties());
}
 
开发者ID:BaderLab,项目名称:AutoAnnotateApp,代码行数:5,代码来源:CyActivator.java


示例8: start

import org.cytoscape.application.swing.CyAction; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void start(BundleContext bc) throws Exception {

    // reference services
    final StreamUtil streamUtil = getService(bc, StreamUtil.class);
    final CyApplicationManager appMgr = getService(bc, CyApplicationManager.class);
    final CyNetworkViewFactory cyNetworkViewFactory = getService(bc, CyNetworkViewFactory.class);
    final CyNetworkFactory cyNetworkFactory = getService(bc, CyNetworkFactory.class);
    final CyNetworkManager cyNetworkManager = getService(bc, CyNetworkManager.class);
    final CyNetworkViewManager cyNetworkViewManager = getService(bc, CyNetworkViewManager.class);
    final CyRootNetworkManager cyRootNetworkManager = getService(bc, CyRootNetworkManager.class);
    final CyTableManager cyTableManager = getService(bc, CyTableManager.class);
    final CyTableFactory cyTableFactory = getService(bc, CyTableFactory.class);
    final VisualMappingManager visMgr = getService(bc, VisualMappingManager.class);
    final VizmapReaderManager vizmapReaderMgr = getService(bc, VizmapReaderManager.class);
    final CyEventHelper eventHelper = getService(bc, CyEventHelper.class);
    final CySwingApplication cySwingApplication = getService(bc, CySwingApplication.class);
    final CyApplicationConfiguration cyAppConfig = getService(bc, CyApplicationConfiguration.class);

    // contribute visual styles
    CyActivator.contributeStyles(visMgr, vizmapReaderMgr);

    // API implementations
    final GraphReader graphReader = new GraphReaderImpl();
    final GraphConverter belGraphConverter = new BELGraphConverterImpl(cyNetworkFactory);
    final BELEvidenceMapper belEvidenceMapper = new BELEvidenceMapperImpl();

    // register readers
    final CyFileFilter jgfReaderFilter = new JGFFileFilter(streamUtil);
    final JGFNetworkReaderFactory jgfReaderFactory = new JGFNetworkReaderFactory(
            jgfReaderFilter, appMgr, cyNetworkViewFactory, cyNetworkFactory,
            cyNetworkManager, cyNetworkViewManager, cyRootNetworkManager, cyTableFactory,
            cyTableManager, visMgr, eventHelper, graphReader, belGraphConverter,
            belEvidenceMapper);
    final Properties jgfNetworkReaderFactoryProps = new Properties();
    jgfNetworkReaderFactoryProps.put(ID, "JGFNetworkReaderFactory");
    registerService(bc, jgfReaderFactory, InputStreamTaskFactory.class, jgfNetworkReaderFactoryProps);

    // register listeners
    final Properties evidenceProps = new Properties();
    evidenceProps.put("name", "evidence");
    EvidencePanelComponent evidencePanelComponent = new EvidencePanelComponent(belEvidenceMapper, cyTableManager, cyNetworkManager);
    registerAllServices(bc, evidencePanelComponent, evidenceProps);
    registerAllServices(bc, new SessionListener(visMgr, vizmapReaderMgr), new Properties());

    final Properties evidenceFactoryProps = new Properties();
    evidenceFactoryProps.put(ID, "ShowEvidenceFactory");
    evidenceFactoryProps.put(PREFERRED_MENU, "Apps.JGF App");
    evidenceFactoryProps.put(MENU_GRAVITY, "14.0");
    evidenceFactoryProps.put(TITLE, "View Evidence");
    registerService(bc, new ShowEvidenceFactory(cyTableManager, cySwingApplication, evidencePanelComponent), EdgeViewTaskFactory.class, evidenceFactoryProps);

    // register about action
    AbstractCyAction aboutAction = new AbstractCyAction("About") {
        @Override
        public void actionPerformed(ActionEvent e) {
            About.showDialog(JGFApp.NAME, JGFApp.DESC, JGFApp.VERSION, JGFApp.ICON, JGFApp.LINKS);
        }
    };
    aboutAction.setMenuGravity(0.0f);
    aboutAction.setPreferredMenu("Apps.JGF App");
    final Properties aboutActionProps = new Properties();
    aboutActionProps.put("id", "jgfApp.about.action");
    registerService(bc, aboutAction, CyAction.class, aboutActionProps);

    // register help action
    AbstractCyAction helpAction = createBrowseHelpAction("/docs.zip", "docs/index.html", cyAppConfig, this);
    helpAction.setMenuGravity(1.0f);
    helpAction.setPreferredMenu("Apps.JGF App");
    final Properties helpActionProps = new Properties();
    helpActionProps.put("id", "jgfApp.help.action");
    registerService(bc, helpAction, CyAction.class, helpActionProps);
}
 
开发者ID:jsongraph,项目名称:jgf-app,代码行数:77,代码来源:CyActivator.java


示例9: start

import org.cytoscape.application.swing.CyAction; //导入依赖的package包/类
/**
 * Upon bundle activation (install or startup).
 */
public void start(BundleContext bc) {
    // Manager services.
    //CySwingApplication desktopManager = getService(bc, CySwingApplication.class);
    
    // Basic access to current and/or currently selected networks, 
    // views and rendering engines in an instance of Cytoscape.
    CyApplicationManager applicationManager = getService(bc, CyApplicationManager.class);
    
    // Access to all root networks
    CyRootNetworkManager rootNetworkManager = getService(bc, CyRootNetworkManager.class);
    
    // Access to all networks
    CyNetworkManager networkManager = getService(bc, CyNetworkManager.class);
    
    // This object manages mapping from view model to VisualStyle. 
    // User objects can access all VisualStyles and VisualMappingFunctions through this class.
    VisualMappingManager visualMappingManager = getService(bc, VisualMappingManager.class);
    
    // The CyGroupManager maintains information about all of the groups an instance of Cytoscape.
    CyGroupManager groupManager = getService(bc, CyGroupManager.class);
    
    // An interface describing a factory used for creating CyGroup objects.
    CyGroupFactory groupFactory = getService(bc, CyGroupFactory.class);
    
    TaskManager taskManager = getService(bc, TaskManager.class);
    
    // Action, the group viewer
    ViewerAction viewerAction =
            new ViewerAction(applicationManager,
                             visualMappingManager,
                             groupManager,
                             groupFactory);
    
    // Action, the group selector
    /*GroupsFromColumnsAction groupsAction =
            new GroupsFromColumnsAction(applicationManager,
                                        groupManager,
                                        groupFactory);*/
    
    // The eXamine control panel
    ControlPanel controlPanel = new ControlPanel(networkManager, rootNetworkManager, 
    		applicationManager, groupManager, groupFactory, taskManager);

    // Register it as a service.
    registerService(bc, viewerAction, CyAction.class, new Properties());
    //registerService(bc, groupsAction, CyAction.class, new Properties());
    registerService(bc, controlPanel, CytoPanelComponent.class, new Properties());
    registerService(bc, controlPanel, SetCurrentNetworkListener.class, new Properties());
    registerService(bc, controlPanel, RowsSetListener.class, new Properties());
    registerService(bc, controlPanel, ColumnNameChangedListener.class, new Properties());
    registerService(bc, controlPanel, ColumnDeletedListener.class, new Properties());
    registerService(bc, controlPanel, ColumnCreatedListener.class, new Properties());
    registerService(bc, controlPanel, NetworkDestroyedListener.class, new Properties());
    registerService(bc, controlPanel, SessionLoadedListener.class, new Properties());
}
 
开发者ID:ls-cwi,项目名称:eXamine,代码行数:59,代码来源:CyActivator.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java FairSharePolicy类代码示例发布时间:2022-05-22
下一篇:
Java SlidrInterface类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap