本文整理汇总了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);
});
}
示例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);;
}
});
}
示例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<>();
}
示例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);
}
示例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());
}
示例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());
}
示例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<>();
}
示例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());
}
示例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;
}
示例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));
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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);
}