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


Java SessionAboutToBeSavedListener类代码示例

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


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

示例1: start

import org.cytoscape.session.events.SessionAboutToBeSavedListener; //导入依赖的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


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