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


Java CySwingApplication类代码示例

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


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

示例1: run

import org.cytoscape.application.swing.CySwingApplication; //导入依赖的package包/类
@Override
public void run(TaskMonitor taskMonitor) throws Exception {
	SwingUtilities.invokeLater( () -> {
		final JFrame parent = registrar.getService(CySwingApplication.class).getJFrame();
		final JDialog frm = new JDialog(parent, "Manage data series mappings");
		frm.setLayout(new BorderLayout());
		frm.add(new MappingManagerPanel(registrar), BorderLayout.CENTER);
		JButton closeButton = new JButton("Close");
		closeButton.addActionListener(e -> frm.setVisible(false));
		frm.add(closeButton, BorderLayout.SOUTH);
		frm.pack();			
		frm.setModal(true);
		int x = (parent.getWidth() - frm.getWidth()) / 2;
		int y = (parent.getHeight() - frm.getHeight()) / 2;
		frm.setLocation(parent.getX() + x, parent.getY() + y);
		frm.setVisible(true);		
	});
}
 
开发者ID:cas-bioinf,项目名称:cy-dataseries,代码行数:19,代码来源:ManageMappingsTask.java

示例2: ensurePanelVisible

import org.cytoscape.application.swing.CySwingApplication; //导入依赖的package包/类
public static void ensurePanelVisible(CyServiceRegistrar registrar, CytoPanelComponent panel)
{
	CytoPanel cytoPanel = registrar.getService(CySwingApplication.class).getCytoPanel(panel.getCytoPanelName());
	if(cytoPanel.getState() == CytoPanelState.HIDE)
	{
		cytoPanel.setState(CytoPanelState.DOCK);
	}
	
	SwingUtilities.invokeLater(() -> {
		int index = cytoPanel.indexOfComponent(panel.getComponent());
		if(index >= 0)
		{
			cytoPanel.setSelectedIndex(index);;
		}
		
	});
	
}
 
开发者ID:cas-bioinf,项目名称:cy-dataseries,代码行数:19,代码来源:UIUtils.java

示例3: SafeController

import org.cytoscape.application.swing.CySwingApplication; //导入依赖的package包/类
public SafeController(CyServiceRegistrar registrar,
                      CySwingApplication application,
                      CyApplicationManager applicationManager,
                      ImportPanelController importPanel,
                      AttributeBrowserController attributeBrowser,
                      CompositeMapController compositeMapPanel,
                      DomainBrowserController domainBrowser,
                      EventService eventService,
                      SafeSessionSerializer serializer,
                      SelectionTracker selectionTracker) {

    this.registrar = registrar;
    this.application = application;
    this.applicationManager = applicationManager;

    this.importPanel = importPanel;
    this.attributeBrowser = attributeBrowser;
    this.compositeMapPanel = compositeMapPanel;
    this.domainBrowser = domainBrowser;
    this.eventService = eventService;
    this.serializer = serializer;
    this.selectionTracker = selectionTracker;

    sessionsBySuid = new LongObjectHashMap<>();
}
 
开发者ID:baryshnikova-lab,项目名称:safe-java,代码行数:26,代码来源:SafeController.java

示例4: start

import org.cytoscape.application.swing.CySwingApplication; //导入依赖的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

示例5: start

import org.cytoscape.application.swing.CySwingApplication; //导入依赖的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

示例6: start

import org.cytoscape.application.swing.CySwingApplication; //导入依赖的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

示例7: AnnotationChooserController

import org.cytoscape.application.swing.CySwingApplication; //导入依赖的package包/类
public AnnotationChooserController(CySwingApplication application,
                                   DialogTaskManager taskManager) {
    this.application = application;
    this.taskManager = taskManager;

    lastDirectory = new File(".");

    listeners = new ArrayList<>();
}
 
开发者ID:baryshnikova-lab,项目名称:safe-java,代码行数:10,代码来源:AnnotationChooserController.java

示例8: configure

import org.cytoscape.application.swing.CySwingApplication; //导入依赖的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

示例9: CyServices

import org.cytoscape.application.swing.CySwingApplication; //导入依赖的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

示例10: DedalApp

import org.cytoscape.application.swing.CySwingApplication; //导入依赖的package包/类
public DedalApp (CySwingAppAdapter adapter)
{
	super(adapter);
	CySwingApplication application = adapter.getCySwingApplication();
	application.addAction(new MenuAction(adapter));
	application.addAction(new Adjust(adapter));
	application.addAction(new TransitionalLayout(adapter));
}
 
开发者ID:sysbio-curie,项目名称:DeDaL,代码行数:9,代码来源:DedalApp.java

示例11: SlimscapePluginAction

import org.cytoscape.application.swing.CySwingApplication; //导入依赖的package包/类
public SlimscapePluginAction(final CyApplicationManager manager, final CyAppAdapter adapter,
                             final CySwingApplication desktopApp, SlimPanel slimPanel) {
    super(MENU_NAME);
    this.adapter = adapter;
    this.manager = manager;
    this.desktopApp = desktopApp;

    setPreferredMenu("Apps");

    this.cytoPanelWest = this.desktopApp.getCytoPanel(CytoPanelName.WEST);
    this.slimPanel = slimPanel;

}
 
开发者ID:passeridae,项目名称:SLiMscape,代码行数:14,代码来源:SlimscapePluginAction.java

示例12: ControlPanelAction

import org.cytoscape.application.swing.CySwingApplication; //导入依赖的package包/类
public ControlPanelAction(CySwingApplication desktopApp,
		MyControlPanel myCytoPanel){
	// Add a menu item -- Apps->sample02
	super("Control Panel");
	setPreferredMenu("Apps.Samples");

	this.desktopApp = desktopApp;
	
	//Note: myControlPanel is bean we defined and registered as a service
	this.cytoPanelWest = this.desktopApp.getCytoPanel(CytoPanelName.WEST);
	this.myControlPanel = myCytoPanel;
}
 
开发者ID:DataFusion4NetBio,项目名称:Paper16-SCODE,代码行数:13,代码来源:ControlPanelAction.java

示例13: start

import org.cytoscape.application.swing.CySwingApplication; //导入依赖的package包/类
@Override
public void start(BundleContext context) throws Exception {
	networkFactory = getService(context, CyNetworkFactory.class);
	networkManager = getService(context, CyNetworkManager.class);
	networkNaming = getService(context, CyNetworkNaming.class);
	networkViewFactory = getService(context, CyNetworkViewFactory.class);
	networkViewManager = getService(context, CyNetworkViewManager.class);
	serviceRegistrar = getService(context, CyServiceRegistrar.class);
	
	//Set up tabbed panel in Control Panel
	CySwingApplication cytoscapeDesktopService = getService(context,CySwingApplication.class);
	
	
	CyApplicationManager appManager = getService(context, CyApplicationManager.class);
	
	OpenTaskFactory openTaskFactory = new OpenTaskFactory(cytoscapeDesktopService, serviceRegistrar, appManager);
	Properties openTaskFactoryProps = new Properties();
	openTaskFactoryProps.setProperty("preferredMenu", "Apps.SCODE");
	openTaskFactoryProps.setProperty("title", "Open SCODE");
	openTaskFactoryProps.setProperty("menuGravity","1.0");
	
	registerService(context, openTaskFactory, TaskFactory.class, openTaskFactoryProps);
	
	CloseTaskFactory closeTaskFactory = new CloseTaskFactory(cytoscapeDesktopService, serviceRegistrar);
	Properties closeTaskFactoryProps = new Properties();
	closeTaskFactoryProps.setProperty("preferredMenu", "Apps.SCODE");
	closeTaskFactoryProps.setProperty("title", "Close SCODE");
	closeTaskFactoryProps.setProperty("menuGravity","2.0");
	
	registerService(context, closeTaskFactory, TaskFactory.class, closeTaskFactoryProps);

}
 
开发者ID:DataFusion4NetBio,项目名称:Paper16-SCODE,代码行数:33,代码来源:CyActivator.java

示例14: KddnMenuAction

import org.cytoscape.application.swing.CySwingApplication; //导入依赖的package包/类
public KddnMenuAction(CyApplicationManager cyApplicationManager, final String menuTitle,
		CySwingApplication desktopApp,
		KddnConfigurePanel myControlPanel) {
	
	super(menuTitle);
	setPreferredMenu("Apps.KDDN");
	
	this.name = name;
	this.desktopApp = desktopApp;
	this.cyPanelWest = this.desktopApp.getCytoPanel(CytoPanelName.WEST);
	this.controlPanel = myControlPanel;
}
 
开发者ID:tianye03,项目名称:kddn-cytoscape,代码行数:13,代码来源:KddnMenuAction.java

示例15: KddnResultsPanel

import org.cytoscape.application.swing.CySwingApplication; //导入依赖的package包/类
/**
 * Default constructor
 * creates an empty results panel
 * @param desktop 
 */
public KddnResultsPanel(CySwingApplication desktop){
	this.desktop = desktop;
	this.cytoPanelEast = this.desktop.getCytoPanel(getCytoPanelName());
	this.setVisible(true);

	int width = (int)(0.2 * Toolkit.getDefaultToolkit().getScreenSize().getWidth());
	this.setPreferredSize(new Dimension(width, 0));
	this.setLayout(new BorderLayout());
	this.resultsTabbedPanel = new JTabbedPane();

	this.add(resultsTabbedPanel, BorderLayout.CENTER);
}
 
开发者ID:tianye03,项目名称:kddn-cytoscape,代码行数:18,代码来源:KddnResultsPanel.java


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