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


Java TaskMonitor.setStatusMessage方法代码示例

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


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

示例1: run

import org.cytoscape.work.TaskMonitor; //导入方法依赖的package包/类
@Override
public void run(TaskMonitor taskMonitor) throws Exception {
	taskMonitor.setTitle(BuildProperties.APP_NAME);
	taskMonitor.setStatusMessage("Removing Clusters");
	
	ShapeAnnotation shape = annotationRenderer.removeShapeAnnoation(cluster);
	TextAnnotation text = annotationRenderer.removeTextAnnotation(cluster);
	
	// invokeAndWait forces the shape to update on the current thread
	if(shape != null) {
		if(SwingUtilities.isEventDispatchThread()) {
			shape.removeAnnotation();
		} else {
			SwingUtilities.invokeAndWait(shape::removeAnnotation);
		}
	}
	if(text != null) {
		if(SwingUtilities.isEventDispatchThread()) {
			text.removeAnnotation();
		} else {
			SwingUtilities.invokeAndWait(text::removeAnnotation);
		}
	}
}
 
开发者ID:BaderLab,项目名称:AutoAnnotateApp,代码行数:25,代码来源:EraseClusterTask.java

示例2: run

import org.cytoscape.work.TaskMonitor; //导入方法依赖的package包/类
@Override
public void run(TaskMonitor taskMonitor) {
	taskMonitor.setTitle(BuildProperties.APP_NAME);
	taskMonitor.setStatusMessage("Removing Annotations");
	
	CyNetworkView networkView = networkViewSet.getNetworkView();
	List<Annotation> annotations = annotationManager.getAnnotations(networkView);
	if(annotations != null) { // seriously?
		for(Annotation annotation : annotations) {
			try {
				SwingUtilities.invokeAndWait(annotation::removeAnnotation);
			} catch (Exception e) {}
		}
	}
	
	for(Cluster cluster : networkViewSet.getAllClusters()) {
		annotationRenderer.removeShapeAnnoation(cluster);
		annotationRenderer.removeTextAnnotation(cluster);
	}
}
 
开发者ID:BaderLab,项目名称:AutoAnnotateApp,代码行数:21,代码来源:RemoveAllAnnotationsTask.java

示例3: run

import org.cytoscape.work.TaskMonitor; //导入方法依赖的package包/类
@Override
public void run(TaskMonitor taskMonitor) {
	taskMonitor.setTitle(BuildProperties.APP_NAME);
	taskMonitor.setStatusMessage("Drawing Annotations");
	
	try {
		// So basically the task does nothing if the cluster is collapsed.
		// This just saves us from having to put an if-statement in the renderer.
		if(!cluster.isCollapsed()) {
			drawShape();
			drawLabel();
		}
	} catch(Exception e) {
		e.printStackTrace();
	}
}
 
开发者ID:BaderLab,项目名称:AutoAnnotateApp,代码行数:17,代码来源:DrawClusterTask.java

示例4: run

import org.cytoscape.work.TaskMonitor; //导入方法依赖的package包/类
/**
 * This is fast because no events are fired while the summary network is being built. 
 * The summary network and view are registered at the end.
 */
@Override
public void run(TaskMonitor taskMonitor) {
	taskMonitor.setTitle(BuildProperties.APP_NAME);
	taskMonitor.setStatusMessage(SummaryNetworkAction.TITLE);
	
	
	CyNetwork originNetwork = annotationSet.getParent().getNetwork();
	List<SummaryCluster> summaryClusters = getSummaryClusters();
	
	// create summary network
	SummaryNetwork summaryNetwork = createSummaryNetwork(originNetwork, summaryClusters);
	
	// create summary network view
	CyNetworkView summaryNetworkView = createNetworkView(summaryNetwork);
	
	// apply visual style
	applyVisualStyle(annotationSet.getParent().getNetworkView(), summaryNetworkView, summaryNetwork);
	
	// register
	networkManager.addNetwork(summaryNetwork.network);
	networkViewManager.addNetworkView(summaryNetworkView);
	summaryNetworkView.fitContent();
	
	resultNetwork = summaryNetwork.network;
}
 
开发者ID:BaderLab,项目名称:AutoAnnotateApp,代码行数:30,代码来源:SummaryNetworkTask.java

示例5: createSifNodeAttr

import org.cytoscape.work.TaskMonitor; //导入方法依赖的package包/类
private void createSifNodeAttr(Model model, CyNetwork cyNetwork,
							   TaskMonitor taskMonitor) throws IOException
{
	taskMonitor.setStatusMessage("Updating SIF network node attributes from the BioPAX model...");

	// Set the Quick Find Default Index
	AttributeUtil.set(cyNetwork, cyNetwork, "quickfind.default_index", CyNetwork.NAME, String.class);
	if (cancelled) return;

	// Set node attributes from the Biopax Model
	for (CyNode node : cyNetwork.getNodeList()) {
		String uri = cyNetwork.getRow(node).get(CyNetwork.NAME, String.class);
		BioPAXElement e = model.getByID(uri);
		if(e instanceof EntityReference || e instanceof Entity) 
		{
			BioPaxMapper.createAttributesFromProperties(e, model, node, cyNetwork);
		} else if (e != null) {
			log.warn("SIF network has an unexpected node: " + uri + " of type " + e.getModelInterface());
			BioPaxMapper.createAttributesFromProperties(e, model, node, cyNetwork);
		} else { //should never happen anymore...
			log.error("(BUG) the biopax model does not have an object with URI=" + uri);
		}
	}
}
 
开发者ID:cytoscape,项目名称:biopax,代码行数:25,代码来源:BioPaxReaderTask.java

示例6: run

import org.cytoscape.work.TaskMonitor; //导入方法依赖的package包/类
@Override
    public void run(TaskMonitor tm) throws Exception {
        tm.setTitle("Adjacency Matrix import");
        tm.setStatusMessage("Adjacency Matrix import");
        
        CyNetwork n = readAdjFormat(inputStream, tm);
        this.networks = new CyNetwork[]{n};
        networkMgr.addNetwork(n);
//        GraphsWithValidation gv = checkSchema(inputStream, graphReader);
//        Graph[] graphs = gv.getGraphs();
//        tm.setProgress(0.50);
//
//        tm.setStatusMessage(format("Creating %d networks from \"%s\".", graphs.length, inputName));
//        this.networks = mapNetworks(graphs);
//        for (CyNetwork n : this.networks)
//            networkMgr.addNetwork(n);
//
//        // set up evidence table if we have cytoscape networks
//        if (this.networks.length > 0) {
//            CyTable table = getOrCreateEvidenceTable();
//            mapGraphsToEvidenceTable(graphs, table);
//            tableMgr.addTable(table);
//        }
//        m.setProgress(1.0);
    }
 
开发者ID:srikanthBezawada,项目名称:AdjacencyMatrixExporter,代码行数:26,代码来源:AdjNetworkReader.java

示例7: run

import org.cytoscape.work.TaskMonitor; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void run(TaskMonitor m) throws Exception {
    m.setTitle("Import BEL JSON Graph");

    m.setStatusMessage(format("Read and validate \"%s\" against the BEL JSON Graph schema.", inputName));
    GraphsWithValidation gv = checkSchema(inputStream, graphReader);
    Graph[] graphs = gv.getGraphs();
    m.setProgress(0.50);

    m.setStatusMessage(format("Creating %d networks from \"%s\".", graphs.length, inputName));
    this.networks = mapNetworks(graphs);
    for (CyNetwork n : this.networks)
        networkMgr.addNetwork(n);

    // set up evidence table if we have cytoscape networks
    if (this.networks.length > 0) {
        CyTable table = getOrCreateEvidenceTable();
        mapGraphsToEvidenceTable(graphs, table);
        tableMgr.addTable(table);
    }
    m.setProgress(1.0);
}
 
开发者ID:jsongraph,项目名称:jgf-app,代码行数:26,代码来源:JGFNetworkReader.java

示例8: run

import org.cytoscape.work.TaskMonitor; //导入方法依赖的package包/类
@Override
public void run(TaskMonitor monitor) throws Exception {
	monitor.setStatusMessage("Executing ForceAtlas2 layout"); 

	List<ExtensionCall> calls = exec.buildExtensionCalls();

	double progress = 0.0;
	for(ExtensionCall call : calls){
		Object callRetValue = plugin.getInteractor().executeExtensionCall(call,false);
		exec.processCallResponse(call,callRetValue);
		++progress;
		monitor.setProgress(progress / ((double)calls.size()));
		
	}
	
}
 
开发者ID:gsummer,项目名称:cyNeo4j,代码行数:17,代码来源:ForceAtlas2LayoutExtMenuAction.java

示例9: run

import org.cytoscape.work.TaskMonitor; //导入方法依赖的package包/类
@Override
public void run(TaskMonitor taskMonitor) throws Exception {
	if (taskMonitor != null) {
		taskMonitor.setTitle("Writing to D3-Style JSON");
		taskMonitor.setStatusMessage("Writing network in D3.js format...");
		taskMonitor.setProgress(-1.0);
	}

	network2jsonMapper.writeValue(new OutputStreamWriter(outputStream, EncodingUtil.getEncoder()), network);
	outputStream.close();

	if (taskMonitor != null) {
		taskMonitor.setStatusMessage("Success.");
		taskMonitor.setProgress(1.0);
	}
}
 
开发者ID:keiono,项目名称:cytoscape-d3,代码行数:17,代码来源:D3NetworkWriter.java

示例10: createSifNodeAttr

import org.cytoscape.work.TaskMonitor; //导入方法依赖的package包/类
private void createSifNodeAttr(Model model, CyNetwork cyNetwork,
							   TaskMonitor taskMonitor) throws IOException
{
	taskMonitor.setStatusMessage("Updating SIF network node attributes from the BioPAX model...");

	// Set the Quick Find Default Index
	Attributes.set(cyNetwork, cyNetwork, "quickfind.default_index", CyNetwork.NAME, String.class);
	if (cancelled) return;

	// Set node attributes from the Biopax Model
	for (CyNode node : cyNetwork.getNodeList()) {
		String uri = cyNetwork.getRow(node).get(CyNetwork.NAME, String.class);
		BioPAXElement e = model.getByID(uri);
		if(e instanceof EntityReference || e instanceof Entity) 
		{
			BioPaxMapper.createAttributesFromProperties(e, model, node, cyNetwork);
		} else if (e != null) {
			log.warn("SIF network has an unexpected node: " + uri + " of type " + e.getModelInterface());
			BioPaxMapper.createAttributesFromProperties(e, model, node, cyNetwork);
		} else { //should never happen anymore...
			log.error("(BUG) the biopax model does not have an object with URI=" + uri);
		}
	}
}
 
开发者ID:PathwayCommons,项目名称:CyPath2,代码行数:25,代码来源:BioPaxReaderTask.java

示例11: run

import org.cytoscape.work.TaskMonitor; //导入方法依赖的package包/类
@Override
public void run(TaskMonitor taskMonitor) throws Exception {
    taskMonitor.setTitle("SAFE: Export Reports");

    EnrichmentLandscape landscape = session.getEnrichmentLandscape();
    CompositeMap compositeMap = session.getCompositeMap();
    AnnotationProvider annotationProvider = landscape.getAnnotationProvider();

    writeReports(landscape, compositeMap, EnrichmentLandscape.TYPE_HIGHEST);
    if (!annotationProvider.isBinary()) {
        writeReports(landscape, compositeMap, EnrichmentLandscape.TYPE_LOWEST);
    }

    taskMonitor.setStatusMessage("Reports exported successfully");
}
 
开发者ID:baryshnikova-lab,项目名称:safe-java,代码行数:16,代码来源:ExportReportsTask.java

示例12: run

import org.cytoscape.work.TaskMonitor; //导入方法依赖的package包/类
@Override
public void run(TaskMonitor taskMonitor) throws Exception {
    taskMonitor.setTitle("SAFE: Export Reports");

    EnrichmentLandscape landscape = session.getEnrichmentLandscape();
    AnnotationProvider annotationProvider = landscape.getAnnotationProvider();

    writeReports(landscape, EnrichmentLandscape.TYPE_HIGHEST);
    if (!annotationProvider.isBinary()) {
        writeReports(landscape, EnrichmentLandscape.TYPE_LOWEST);
    }

    taskMonitor.setStatusMessage("Reports exported successfully");
}
 
开发者ID:baryshnikova-lab,项目名称:safe-java,代码行数:15,代码来源:ExportNeighborhoodReportsTask.java

示例13: run

import org.cytoscape.work.TaskMonitor; //导入方法依赖的package包/类
@Override
public void run(TaskMonitor taskMonitor)  {
	taskMonitor.setTitle(BuildProperties.APP_NAME);
	taskMonitor.setStatusMessage("Selecting Clusters");
	
	AnnotationSet annotationSet = cluster.getParent();
	DisplayOptions displayOptions = annotationSet.getDisplayOptions();
	
	ShapeAnnotation shape = annotationRenderer.getShapeAnnotation(cluster);
	TextAnnotation text = annotationRenderer.getTextAnnotation(cluster);
	
	
	if(shape != null) {
		if(select) {
			shape.setBorderColor(DrawClusterTask.SELECTED_COLOR);
			shape.setBorderWidth(3 * displayOptions.getBorderWidth());
		} else {
			shape.setBorderColor(displayOptions.getBorderColor());
			shape.setBorderWidth(displayOptions.getBorderWidth());
		}
		shape.update();
	}
	
	if(text != null) {
		if(select) {
			text.setTextColor(DrawClusterTask.SELECTED_COLOR);
		} else {
			text.setTextColor(displayOptions.getFontColor());
		}
		text.update();
	}
}
 
开发者ID:BaderLab,项目名称:AutoAnnotateApp,代码行数:33,代码来源:SelectClusterTask.java

示例14: taskMessage

import org.cytoscape.work.TaskMonitor; //导入方法依赖的package包/类
public static Task taskMessage(String message) {
	return new AbstractTask() {
		@Override
		public void run(TaskMonitor taskMonitor)  {
			taskMonitor.setTitle(BuildProperties.APP_NAME);
			taskMonitor.setStatusMessage(message);
		}
	};
}
 
开发者ID:BaderLab,项目名称:AutoAnnotateApp,代码行数:10,代码来源:TaskTools.java

示例15: run

import org.cytoscape.work.TaskMonitor; //导入方法依赖的package包/类
@Override
public void run(TaskMonitor taskMonitor) {
	taskMonitor.setTitle(BuildProperties.APP_NAME);
	taskMonitor.setStatusMessage("Calculating Cluster Label");
	
	AnnotationSet annotationSet = cluster.getParent();
	Collection<CyNode> nodes = cluster.getNodes();
	CyNetwork network = annotationSet.getParent().getNetwork();
	String labelColumn = annotationSet.getLabelColumn();
	
	String label = labelMaker.makeLabel(network, nodes, labelColumn);
	cluster.setLabel(label);
}
 
开发者ID:BaderLab,项目名称:AutoAnnotateApp,代码行数:14,代码来源:RecalculateLabelTask.java


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