本文整理汇总了Java中org.cytoscape.application.swing.AbstractCyAction类的典型用法代码示例。如果您正苦于以下问题:Java AbstractCyAction类的具体用法?Java AbstractCyAction怎么用?Java AbstractCyAction使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AbstractCyAction类属于org.cytoscape.application.swing包,在下文中一共展示了AbstractCyAction类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: registerAction
import org.cytoscape.application.swing.AbstractCyAction; //导入依赖的package包/类
private void registerAction(BundleContext bc, AbstractCyAction action) {
action.setPreferredMenu("Apps." + BuildProperties.APP_NAME);
registerService(bc, action, CyAction.class, new Properties());
}
示例2: start
import org.cytoscape.application.swing.AbstractCyAction; //导入依赖的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);
}
示例3: Plugin
import org.cytoscape.application.swing.AbstractCyAction; //导入依赖的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>();
}
示例4: registerAction
import org.cytoscape.application.swing.AbstractCyAction; //导入依赖的package包/类
public void registerAction(AbstractCyAction action){
registeredActions.add(action);
getCySwingApplication().addAction(action);
}
示例5: unregisterActions
import org.cytoscape.application.swing.AbstractCyAction; //导入依赖的package包/类
public void unregisterActions() {
for(AbstractCyAction action : registeredActions){
getCySwingApplication().removeAction(action);
}
}
示例6: setLocalSupportedExtension
import org.cytoscape.application.swing.AbstractCyAction; //导入依赖的package包/类
@Override
public void setLocalSupportedExtension(Map<String,AbstractCyAction> localExtensions) {
this.localExtensions = localExtensions;
}
示例7: getShowHideAction
import org.cytoscape.application.swing.AbstractCyAction; //导入依赖的package包/类
public AbstractCyAction getShowHideAction();
示例8:
import org.cytoscape.application.swing.AbstractCyAction; //导入依赖的package包/类
public void setLocalSupportedExtension(Map<String,AbstractCyAction> localExtensions);