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


Java FileCoordinator类代码示例

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


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

示例1: snapshot

import mesquite.lib.duties.FileCoordinator; //导入依赖的package包/类
/** Broadcasts that an id has been assigned to a module.  This is used for scripting, in which a module assigns itself
an id string in a snapshot (e.g., a TreeContext) that an interested module can clue in to (e.g., TreeOfContext).  This
allows the interested module to hook up to the assigning module even if the former was script-created before the latter
(see interaction between BasicTreeWindow and TreeOfContext)*/
private void broadCastElementAdded(MesquiteModule module, ElementManager excluding){
	if (module == null)
		return;
	EmployeeVector employees = module.getEmployeeVector();
	if (employees ==null)
		return;
	Enumeration enumeration=employees.elements();
	while (enumeration.hasMoreElements()){
		MesquiteModule mb = (MesquiteModule)enumeration.nextElement();
		broadCastElementAdded(mb, excluding);
		if (mb instanceof ElementManager && mb !=excluding)
			((ElementManager)mb).elementAdded(this);
	}
	FileCoordinator coord = module.getFileCoordinator();
	if (coord != null)
		coord.elementAdded(this);
}
 
开发者ID:MesquiteProject,项目名称:MesquiteCore,代码行数:22,代码来源:FileElement.java

示例2: checkNumericalLabelInterpretation

import mesquite.lib.duties.FileCoordinator; //导入依赖的package包/类
boolean checkNumericalLabelInterpretation(String c){
	if (numericalLabelInterpretationSet){ //user has answered, therefore follow guidance
		if (interpretLabelsAsNumerical)
			return true;
		return false;
	}

	if (taxa != null){
		MesquiteProject project = taxa.getProject();
		FileCoordinator fc = project.getCoordinatorModule();
		TreesManager em = (TreesManager)fc.findManager(fc, TreeVector.class);
		boolean[] interps = new boolean[4]; //0 interpret as number (vs. text); 1 interpret as on branch (vs. node); 2 remember
		MesquiteString n = new MesquiteString(); //the code name of the value, e.g. "consensusFrequency"
		numericalLabelInterpretationSet = em.queryAboutNumericalLabelIntepretation(interps, c, n);
		if (numericalLabelInterpretationSet){
			if (interps[0]){ // treat as number
				interpretLabelsAsNumerical = true;
				defaultValueCode = StringUtil.tokenize(n.getValue());
				defaultValueCodeRef = NameReference.getNameReference(defaultValueCode);
				interpretNumericalLabelsAsOnBranches = interps[1];
				if (interps[2]){
					defaultValueCodeRUN = defaultValueCode;
					interpretNumericalLabelsAsOnBranchesRUN = interpretNumericalLabelsAsOnBranches;
					numericalLabelInterpretationSetRUN = true;
				}
				return true;
			}
		}
	}
	return false;
}
 
开发者ID:MesquiteProject,项目名称:MesquiteCore,代码行数:32,代码来源:MesquiteTree.java

示例3: dispose

import mesquite.lib.duties.FileCoordinator; //导入依赖的package包/类
/** Deletes the file element. Should typically be called via close()  to make sure that the file element is not in use etc. */
public void dispose() {
	/* Subrclasses: should deassign storage to help catch post-deletion use */
	doomed = true;

	/*if (projectClosing){
		incrementNotifySuppression();
		super.dispose();
		return;
	}
	 */
	//Notify file
	if (file != null) 
		file.removeFileElement(this);
	//Notify project
	if (project !=null) {
		project.removeFileElement(this);
		if (nexusBlock !=null)
			project.removeNexusBlock(nexusBlock);
	}
	if (nexusBlock !=null)
		nexusBlock.dispose();
	//Notify manager (which could then remove from its lists, delete NEXUS blocks, etc.)
	if (getManager()!=null) {
		getManager().elementDisposed(this);
		FileCoordinator coord = ((MesquiteModule)getManager()).getFileCoordinator();
		if (coord != null)
			coord.elementDisposed(this);
	}
		
	if (!projectClosing)
		if (getProject() != null)
			getProject().refreshProjectWindow();
	disposed = true;
	if (MesquiteTrunk.checkMemory && classesCreated.indexOf(getClass())>=0) {
		MesquiteInteger c = (MesquiteInteger)countsOfClassesDisposed.elementAt(classesCreated.indexOf(getClass()));
		if (c!=null)
			c.increment();
	}
	FileElement.totalDisposed++;
	project = null;
	file = null;
	nexusBlock = null;
	elementManager = null;
	super.dispose();
}
 
开发者ID:MesquiteProject,项目名称:MesquiteCore,代码行数:47,代码来源:FileElement.java


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