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


Java RowsSetEvent.containsColumn方法代码示例

本文整理汇总了Java中org.cytoscape.model.events.RowsSetEvent.containsColumn方法的典型用法代码示例。如果您正苦于以下问题:Java RowsSetEvent.containsColumn方法的具体用法?Java RowsSetEvent.containsColumn怎么用?Java RowsSetEvent.containsColumn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.cytoscape.model.events.RowsSetEvent的用法示例。


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

示例1: handleEvent

import org.cytoscape.model.events.RowsSetEvent; //导入方法依赖的package包/类
@Override
	public void handleEvent(RowsSetEvent e) {
		if (!e.containsColumn(CyNetwork.SELECTED) || ignoreSelection) 
		{
			return;
		}
		
		CyNetwork currentNetwork = cyApplicationManager.getCurrentNetwork();
		
		if(currentNetwork == null 
				|| e.getSource().equals(currentNetwork.getTable(CyNode.class, CyNetwork.LOCAL_ATTRS)) 
				|| e.getSource().equals(currentNetwork.getTable(CyEdge.class, CyNetwork.LOCAL_ATTRS)))
		{
			updateVisual();
	
			//TODO the above is very inefficient, replace with maintaining the list of selected nodes with
//			 for (RowSetRecord record: e.getColumnRecords(CyNetwork.SELECTED)) {
//		          Long suid = record.getRow().get(CyIdentifiable.SUID, Long.class);
//		          Boolean value = (Boolean)record.getValue();
			
		}
	}
 
开发者ID:cas-bioinf,项目名称:cy-dataseries,代码行数:23,代码来源:DataSeriesVisualPanel.java

示例2: handleEvent

import org.cytoscape.model.events.RowsSetEvent; //导入方法依赖的package包/类
@Override
public void handleEvent(RowsSetEvent e) {
	if(safeRunner.shouldIgnore(EventType.SELECTION)) {
		return;
	}
	if(!e.containsColumn(CyNetwork.SELECTED))
		return;
	
	Optional<AnnotationSet> active = getActiveNetworkViewSet().flatMap(NetworkViewSet::getActiveAnnotationSet);
	if(active.isPresent()) {
		AnnotationSet annotationSet = active.get();
		CyNetwork network = annotationSet.getParent().getNetwork();
		
		if(network.getDefaultNodeTable().equals(e.getSource())) {
			List<Cluster> selectedClusters = new ArrayList<>();
			List<CyNode> selectedNodes = CyTableUtil.getNodesInState(network, CyNetwork.SELECTED, true);
			
			for(Cluster cluster : annotationSet.getClusters()) {
				if(selectedNodes.containsAll(cluster.getNodes())) {
					selectedClusters.add(cluster);
				}
			}
			
			// Fire event even when selectedClusters is empty
			postEventOffEDT(new ModelEvents.ClustersSelected(annotationSet, selectedClusters));
		}
	}
}
 
开发者ID:BaderLab,项目名称:AutoAnnotateApp,代码行数:29,代码来源:ModelManager.java


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