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


Java ListSingleSelection类代码示例

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


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

示例1: MapColumnTask

import org.cytoscape.work.util.ListSingleSelection; //导入依赖的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);
	
}
 
开发者ID:cas-bioinf,项目名称:cy-dataseries,代码行数:23,代码来源:MapColumnTask.java

示例2: AbstractImportTask

import org.cytoscape.work.util.ListSingleSelection; //导入依赖的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());
	}
	
}
 
开发者ID:cas-bioinf,项目名称:cy-dataseries,代码行数:23,代码来源:AbstractImportTask.java

示例3: setSoftFile

import org.cytoscape.work.util.ListSingleSelection; //导入依赖的package包/类
public void setSoftFile(SoftFile file)
{
	softFile = file;		
	if(file.getTables().size() > 1)
	{
		List<StringAndIndex> choice = new ArrayList<>();
		for(int i = 0; i < file.getTables().size(); i++)
		{
			SoftTable softTable = file.getTables().get(i);
			choice.add(new StringAndIndex(i, softTable.getType().toString() + ": " + softTable.getCaption()));
		}
		tableSelection = new ListSingleSelection<>(choice);
	}
	else
	{
		tableSelection = null; //makes the GUI skip the prompt
	}
}
 
开发者ID:cas-bioinf,项目名称:cy-dataseries,代码行数:19,代码来源:ChooseSoftTableTask.java

示例4: getTargetColumns

import org.cytoscape.work.util.ListSingleSelection; //导入依赖的package包/类
private ListSingleSelection<String> getTargetColumns() 
{
	final CyTable table = network.getTable(CyNode.class, CyNetwork.DEFAULT_ATTRS);
	final List<String> colNames = new ArrayList<String>();
	
	for (final CyColumn col : table.getColumns()) {
		// Exclude list, numerical, boolean type columns
		if (String.class.isAssignableFrom(col.getType())) {
			colNames.add(col.getName());
		}
	}

	ListSingleSelection<String> toReturn = 
			new ListSingleSelection<String>(colNames);
	
	if(colNames.contains("UNIPROT"))
		toReturn.setSelectedValue("UNIPROT");
	else if(colNames.contains("GENE SYMBOL"))
		toReturn.setSelectedValue("GENE SYMBOL");
	else if(colNames.contains("URI"))
		toReturn.setSelectedValue("URI");
	else if(colNames.contains(CyRootNetwork.SHARED_NAME))
		toReturn.setSelectedValue(CyRootNetwork.SHARED_NAME); //less desired
	
	return toReturn;
}
 
开发者ID:PathwayCommons,项目名称:CyPath2,代码行数:27,代码来源:ExpandNetworkTask.java

示例5: getExistingColumnForMapping

import org.cytoscape.work.util.ListSingleSelection; //导入依赖的package包/类
@Tunable(description="Existing column", groups={"Column"}, dependsOn="createNewColumn=false", listenForChange ={"targetClass","targetNetwork"})
public ListSingleSelection<String> getExistingColumnForMapping()
{
	if(!updatingExistingColumnForMapping)
	{
		updatingExistingColumnForMapping = true;
		try {
			updateExistingColumnForMapping(targetClass.getSelectedValue().getTargetClass());
		} finally {
			updatingExistingColumnForMapping = false;
		}
	}
	return existingColumnForMapping;
}
 
开发者ID:cas-bioinf,项目名称:cy-dataseries,代码行数:15,代码来源:MapColumnTask.java

示例6: getMapRowNamesWithColumn

import org.cytoscape.work.util.ListSingleSelection; //导入依赖的package包/类
@Tunable(description="Column to match row names", groups={"Mapping"}, dependsOn="mapByRowNames=true", listenForChange ="targetClass")
public ListSingleSelection<String> getMapRowNamesWithColumn()
{
	if(!updatingMapRowNamesWithColumn)
	{
		updatingMapRowNamesWithColumn = true;
		try 
		{
			updateMapRowNamesWithColumn(targetClass.getSelectedValue().getTargetClass());
		} finally {
			updatingMapRowNamesWithColumn = false;
		}
	}
	return mapRowNamesWithColumn;
}
 
开发者ID:cas-bioinf,项目名称:cy-dataseries,代码行数:16,代码来源:MapColumnTask.java

示例7: showColumnsForClass

import org.cytoscape.work.util.ListSingleSelection; //导入依赖的package包/类
private void showColumnsForClass(Class<?> columnType, ListSingleSelection<String> selection, Class<? extends CyIdentifiable> targetClass)
{
	CyNetwork network = targetNetwork.getSelectedValue();
	List<CyColumn> candidateColumns = new ArrayList<>(mappingManager.getMappingTable(network, targetClass).getColumns());
	List<String> filteredCandidateColumnsNames = candidateColumns.stream()
			.filter(col -> col.getType() == columnType && !col.isPrimaryKey())
			.map(col -> col.getName())
			.collect(Collectors.toList());
	
	filteredCandidateColumnsNames.sort(new AlphanumComparator<>());
	
	selection.setPossibleValues(filteredCandidateColumnsNames);
	
}
 
开发者ID:cas-bioinf,项目名称:cy-dataseries,代码行数:15,代码来源:MapColumnTask.java

示例8: SmoothDataSeriesTask

import org.cytoscape.work.util.ListSingleSelection; //导入依赖的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();
}
 
开发者ID:cas-bioinf,项目名称:cy-dataseries,代码行数:8,代码来源:SmoothDataSeriesTask.java

示例9: BaseExportReportsTask

import org.cytoscape.work.util.ListSingleSelection; //导入依赖的package包/类
public BaseExportReportsTask(SafeSession session) {

        CyNetworkView view = session.getNetworkView();
        CyNetwork network = view.getModel();
        nodeTable = network.getDefaultNodeTable();
        List<String> names = SafeUtil.getStringColumnNames(nodeTable)
                                     .collect(Collectors.toList());
        nodeNameColumn = new ListSingleSelection<>(names);

        nodeNameColumn.setSelectedValue(CyNetwork.NAME);

        this.session = session;
    }
 
开发者ID:baryshnikova-lab,项目名称:safe-java,代码行数:14,代码来源:BaseExportReportsTask.java

示例10: listSingleSelectionFromEnum

import org.cytoscape.work.util.ListSingleSelection; //导入依赖的package包/类
public static ListSingleSelection<String> listSingleSelectionFromEnum(Enum<?>[] values) {
	List<String> names = new ArrayList<>(values.length);
	for(Enum<?> value : values) {
		names.add(value.name());
	}
	return new ListSingleSelection<>(names);
}
 
开发者ID:BaderLab,项目名称:AutoAnnotateApp,代码行数:8,代码来源:TaskTools.java

示例11: ExpandNetworkTask

import org.cytoscape.work.util.ListSingleSelection; //导入依赖的package包/类
public ExpandNetworkTask(CyNetworkView cyNetworkView, View<CyNode> cyNodeView) 
{
	network = cyNetworkView.getModel();
	columnSelection = getTargetColumns();
	querySelection = new ListSingleSelection<String>("NEIGHBORHOOD","PATHSBETWEEN");
	querySelection.setSelectedValue("NEIGHBORHOOD");
}
 
开发者ID:PathwayCommons,项目名称:CyPath2,代码行数:8,代码来源:ExpandNetworkTask.java

示例12: SmoothInteractiveShowUITask

import org.cytoscape.work.util.ListSingleSelection; //导入依赖的package包/类
public SmoothInteractiveShowUITask(CyServiceRegistrar registrar) {
	this.registrar = registrar;
	timeSeries = new ListSingleSelection<>(registrar.getService(DataSeriesManager.class).getDataSeriesByType(TimeSeries.class));
}
 
开发者ID:cas-bioinf,项目名称:cy-dataseries,代码行数:5,代码来源:SmoothInteractiveShowUITask.java

示例13: ExponentiateDataSeriesTask

import org.cytoscape.work.util.ListSingleSelection; //导入依赖的package包/类
public ExponentiateDataSeriesTask(DataSeriesManager dataSeriesManager) {
	dataSeries = new ListSingleSelection<>(
			dataSeriesManager.getDataSeriesByType(DoubleDataSeries.class));
}
 
开发者ID:cas-bioinf,项目名称:cy-dataseries,代码行数:5,代码来源:ExponentiateDataSeriesTask.java

示例14: setExistingColumnForMapping

import org.cytoscape.work.util.ListSingleSelection; //导入依赖的package包/类
public void setExistingColumnForMapping(ListSingleSelection<String> columnsForMapping)
{
	this.existingColumnForMapping = columnsForMapping;
}
 
开发者ID:cas-bioinf,项目名称:cy-dataseries,代码行数:5,代码来源:MapColumnTask.java

示例15: setMapRowNamesWithColumn

import org.cytoscape.work.util.ListSingleSelection; //导入依赖的package包/类
public void setMapRowNamesWithColumn(ListSingleSelection<String> mapRowNamesWithColumn)
{
	this.mapRowNamesWithColumn = mapRowNamesWithColumn;
}
 
开发者ID:cas-bioinf,项目名称:cy-dataseries,代码行数:5,代码来源:MapColumnTask.java


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