我是靠谱客的博主 优美皮皮虾,最近开发中收集的这篇文章主要介绍java getselectedtext_Java Taxa.getSelected方法代碼示例,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

import mesquite.lib.Taxa; //導入方法依賴的package包/類

public boolean exportFile(MesquiteFile file, String arguments) { //if file is null, consider whole project open to export

writeTaxaWithAllMissing = false;

CharacterData data = findDataToExport(file, arguments);

Taxa t = null;

if (data != null)

t = data.getTaxa();

if (data ==null) {

showLogWindow(true);

logln("WARNING: No suitable data available for export to a file of format "" + getName() + "". The file will not be written.n");

return false;

}

CharacterPartition partition = (CharacterPartition)data.getCurrentSpecsSet(CharacterPartition.class);

Taxa taxa = data.getTaxa();

boolean dataAnySelected = false;

if (data != null)

dataAnySelected =data.anySelected();

if (!MesquiteThread.isScripting())

if (!getExportOptions(dataAnySelected, taxa.anySelected()))

return false;

if (partition==null && !separateCodPos) {

discreetAlert("The data cannot be exported because partitions (character groups) are not assigned, and use of codon positions is not requested.");

return false;

}

int numTaxa = taxa.getNumTaxa();

int numTaxaWrite;

int countTaxa = 0;

for (int it = 0; it

if ((!writeOnlySelectedTaxa || taxa.getSelected(it)) && (writeTaxaWithAllMissing || data.hasDataForTaxon(it)))

countTaxa++;

numTaxaWrite = countTaxa;

int numChars = 0;

StringBuffer outputBuffer = new StringBuffer(numTaxa*(20 + numChars));

if (data != null){

numChars = data.getNumChars();

int numCharWrite = data.numberSelected(this.writeOnlySelectedData);

outputBuffer.append(Integer.toString(numTaxaWrite)+" ");

outputBuffer.append(Integer.toString(numCharWrite)+this.getLineEnding());

int blockSize=50;

exportBlock(taxa, data, outputBuffer, 0, numChars);

}

saveExportedFileWithExtension(outputBuffer, arguments, "phy");

String cfgString = getPartitionFinderCFGText(data, partition, getExportedFileName());

String cfgFilePath = getExportedFilePath();

cfgFilePath=StringUtil.getAllButLastItem(cfgFilePath, MesquiteFile.fileSeparator)+MesquiteFile.fileSeparator+"partition_finder.cfg";

MesquiteFile.putFileContents(cfgFilePath, cfgString, true);

return true;

}

最后

以上就是优美皮皮虾为你收集整理的java getselectedtext_Java Taxa.getSelected方法代碼示例的全部内容,希望文章能够帮你解决java getselectedtext_Java Taxa.getSelected方法代碼示例所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(412)

评论列表共有 0 条评论

立即
投稿
返回
顶部