本文整理汇总了Java中org.cytoscape.service.util.CyServiceRegistrar类的典型用法代码示例。如果您正苦于以下问题:Java CyServiceRegistrar类的具体用法?Java CyServiceRegistrar怎么用?Java CyServiceRegistrar使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CyServiceRegistrar类属于org.cytoscape.service.util包,在下文中一共展示了CyServiceRegistrar类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: MapColumnTask
import org.cytoscape.service.util.CyServiceRegistrar; //导入依赖的package包/类
public MapColumnTask(CyServiceRegistrar registrar) {
this.applicationManager = registrar.getService(CyApplicationManager.class);
this.mappingManager = registrar.getService(DataSeriesMappingManager.class);
DataSeriesManager dataSeriesManager = registrar.getService(DataSeriesManager.class);
CyNetworkManager networkManager = registrar.getService(CyNetworkManager.class);
targetClass = new ListSingleSelection<>(new TargetClassInfo("Nodes", CyNode.class), new TargetClassInfo("Edges", CyEdge.class));
dataSeries = new ListSingleSelection<>(dataSeriesManager.getAllDataSeries());
existingColumnForMapping = new ListSingleSelection<>();
mapRowNamesWithColumn = new ListSingleSelection<>();
targetNetwork = new ListSingleSelection<>(networkManager.getNetworkSet().stream().toArray(CyNetwork[]::new));
if(applicationManager.getCurrentNetwork() != null)
{
targetNetwork.setSelectedValue(applicationManager.getCurrentNetwork());
}
updateExistingColumnForMapping(CyNode.class);
updateMapRowNamesWithColumn(CyNode.class);
}
示例2: AbstractImportTask
import org.cytoscape.service.util.CyServiceRegistrar; //导入依赖的package包/类
public AbstractImportTask(CyServiceRegistrar registrar) {
super();
this.registrar = registrar;
this.dataSeriesManager = registrar.getService(DataSeriesManager.class);
DataSeriesImportManager importManager = registrar.getService(DataSeriesImportManager.class);
this.provider = new ListSingleSelection<>(importManager.getAllImportProviders().stream()
.map(x -> new ProviderDisplay(x))
.collect(Collectors.toList()));
Optional<ProviderDisplay> timeSeriesDisplay = provider.getPossibleValues().stream()
.filter(x ->
x.getProvider().getImportedClass() != null && TimeSeries.class.isAssignableFrom(x.getProvider().getImportedClass()))
.findAny();
if(timeSeriesDisplay.isPresent())
{
provider.setSelectedValue(timeSeriesDisplay.get());
}
}
示例3: ensurePanelVisible
import org.cytoscape.service.util.CyServiceRegistrar; //导入依赖的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);;
}
});
}
示例4: SafeController
import org.cytoscape.service.util.CyServiceRegistrar; //导入依赖的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<>();
}
示例5: start
import org.cytoscape.service.util.CyServiceRegistrar; //导入依赖的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: SmoothInteractivePerformTask
import org.cytoscape.service.util.CyServiceRegistrar; //导入依赖的package包/类
public SmoothInteractivePerformTask(CyServiceRegistrar registrar, TimeSeries sourceTimeSeries,
double[] estimateX, SingleParameterSmoothingProvider provider, double parameter, Map<String, List<Integer>> rowGrouping, SmoothingPreviewPanel sourcePanel) {
super();
this.registrar = registrar;
this.sourceTimeSeries = sourceTimeSeries;
this.estimateX = estimateX;
this.provider = provider;
this.parameter = parameter;
this.sourcePanel = sourcePanel;
this.rowGrouping = rowGrouping;
outputParameters = new SmoothingOutputParameters();
outputParameters.resultName = sourceTimeSeries + "_Smooth";
}
示例7: SmoothDataSeriesTask
import org.cytoscape.service.util.CyServiceRegistrar; //导入依赖的package包/类
public SmoothDataSeriesTask(CyServiceRegistrar registrar) {
this.dataSeriesManager = registrar.getService(DataSeriesManager.class);
this.smoothingService = registrar.getService(SmoothingService.class);
this.registrar = registrar;
timeSeries = new ListSingleSelection<>(dataSeriesManager.getDataSeriesByType(TimeSeries.class));
outputParameters = new SmoothingOutputParameters();
}
示例8: MappingManagerPanel
import org.cytoscape.service.util.CyServiceRegistrar; //导入依赖的package包/类
/**
* Create the panel.
*/
public MappingManagerPanel(CyServiceRegistrar registrar) {
this.registrar = registrar;
setLayout(new FormLayout(new ColumnSpec[] {
FormSpecs.RELATED_GAP_COLSPEC,
ColumnSpec.decode("default:grow"),
FormSpecs.RELATED_GAP_COLSPEC,
FormSpecs.DEFAULT_COLSPEC,},
new RowSpec[] {
FormSpecs.RELATED_GAP_ROWSPEC,
RowSpec.decode("default:grow"),
FormSpecs.RELATED_GAP_ROWSPEC,
FormSpecs.DEFAULT_ROWSPEC,
FormSpecs.RELATED_GAP_ROWSPEC,}));
JScrollPane scrollPane = new JScrollPane();
add(scrollPane, "2, 2, 3, 1, fill, fill");
table = new JTable();
table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
scrollPane.setViewportView(table);
table.setMinimumSize(new Dimension(100, 100));
JButton btnAddMapping = new JButton("Add");
btnAddMapping.addActionListener(e -> addClicked());
add(btnAddMapping, "2, 4");
JButton btnRemoveMapping = new JButton("Remove Selected");
btnRemoveMapping.addActionListener(e -> removeClicked());
add(btnRemoveMapping, "4, 4");
updateContents();
}
示例9: configure
import org.cytoscape.service.util.CyServiceRegistrar; //导入依赖的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());
}
示例10: start
import org.cytoscape.service.util.CyServiceRegistrar; //导入依赖的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);
}
示例11: SmoothInteractiveShowUITaskFactory
import org.cytoscape.service.util.CyServiceRegistrar; //导入依赖的package包/类
public SmoothInteractiveShowUITaskFactory(CyServiceRegistrar registrar) {
super();
this.registrar = registrar;
}
示例12: MapColumnTaskFactory
import org.cytoscape.service.util.CyServiceRegistrar; //导入依赖的package包/类
public MapColumnTaskFactory(CyServiceRegistrar registrar) {
super();
this.registrar = registrar;
}
示例13: SmoothDataSeriesTaskFactory
import org.cytoscape.service.util.CyServiceRegistrar; //导入依赖的package包/类
public SmoothDataSeriesTaskFactory(CyServiceRegistrar registrar) {
super();
this.registrar = registrar;
dataSeriesManager = registrar.getService(DataSeriesManager.class);
}
示例14: SmoothInteractiveShowUITask
import org.cytoscape.service.util.CyServiceRegistrar; //导入依赖的package包/类
public SmoothInteractiveShowUITask(CyServiceRegistrar registrar) {
this.registrar = registrar;
timeSeries = new ListSingleSelection<>(registrar.getService(DataSeriesManager.class).getDataSeriesByType(TimeSeries.class));
}
示例15: ManageMappingsTaskFactory
import org.cytoscape.service.util.CyServiceRegistrar; //导入依赖的package包/类
public ManageMappingsTaskFactory(CyServiceRegistrar registrar) {
super();
this.registrar = registrar;
}