當前位置: 首頁>>代碼示例>>Java>>正文


Java RepeatTestDataDef.setTo方法代碼示例

本文整理匯總了Java中org.insightech.er.editor.model.testdata.RepeatTestDataDef.setTo方法的典型用法代碼示例。如果您正苦於以下問題:Java RepeatTestDataDef.setTo方法的具體用法?Java RepeatTestDataDef.setTo怎麽用?Java RepeatTestDataDef.setTo使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.insightech.er.editor.model.testdata.RepeatTestDataDef的用法示例。


在下文中一共展示了RepeatTestDataDef.setTo方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getRepeatTestDataDef

import org.insightech.er.editor.model.testdata.RepeatTestDataDef; //導入方法依賴的package包/類
private RepeatTestDataDef getRepeatTestDataDef() {
    final RepeatTestDataDef dataDef = new RepeatTestDataDef();

    dataDef.setType(typeCombo.getText());
    dataDef.setRepeatNum(getIntValue(repeatNum));
    dataDef.setTemplate(template.getText());
    dataDef.setFrom(from.getText());
    dataDef.setTo(to.getText());
    dataDef.setIncrement(increment.getText());

    final String str = selects.getText();
    final BufferedReader reader = new BufferedReader(new StringReader(str));
    String line = null;
    final List<String> lines = new ArrayList<String>();

    try {
        while ((line = reader.readLine()) != null) {
            lines.add(line);
        }
    } catch (final IOException e) {}

    dataDef.setSelects(lines.toArray(new String[lines.size()]));

    return dataDef;
}
 
開發者ID:roundrop,項目名稱:ermasterr,代碼行數:26,代碼來源:RepeatTestDataSettingDialog.java

示例2: getRepeatTestDataDef

import org.insightech.er.editor.model.testdata.RepeatTestDataDef; //導入方法依賴的package包/類
private RepeatTestDataDef getRepeatTestDataDef() {
	RepeatTestDataDef dataDef = new RepeatTestDataDef();

	dataDef.setType(this.typeCombo.getText());
	dataDef.setRepeatNum(this.getIntValue(this.repeatNum));
	dataDef.setTemplate(this.template.getText());
	dataDef.setFrom(this.from.getText());
	dataDef.setTo(this.to.getText());
	dataDef.setIncrement(this.increment.getText());

	String str = this.selects.getText();
	BufferedReader reader = new BufferedReader(new StringReader(str));
	String line = null;
	List<String> lines = new ArrayList<String>();

	try {
		while ((line = reader.readLine()) != null) {
			lines.add(line);
		}
	} catch (IOException e) {
	}

	dataDef.setSelects(lines.toArray(new String[lines.size()]));

	return dataDef;
}
 
開發者ID:kozake,項目名稱:ermaster-k,代碼行數:27,代碼來源:RepeatTestDataSettingDialog.java

示例3: loadRepeatTestData

import org.insightech.er.editor.model.testdata.RepeatTestDataDef; //導入方法依賴的package包/類
private void loadRepeatTestData(final RepeatTestData repeatTestData, final Element parent, final LoadContext context) {
    final Element element = getElement(parent, "repeat_test_data");

    final int testDataNum = getIntegerValue(element, "test_data_num");
    repeatTestData.setTestDataNum(testDataNum);

    final Element dataDefListElement = getElement(element, "data_def_list");

    final NodeList nodeList = dataDefListElement.getElementsByTagName("data_def");

    for (int i = 0; i < nodeList.getLength(); i++) {
        final Element dataDefElement = (Element) nodeList.item(i);

        final String columnId = getStringValue(dataDefElement, "column_id");
        final NormalColumn column = context.columnMap.get(columnId);

        final RepeatTestDataDef dataDef = new RepeatTestDataDef();

        dataDef.setType(getStringValue(dataDefElement, "type"));
        dataDef.setRepeatNum(this.getIntValue(dataDefElement, "repeat_num"));
        dataDef.setTemplate(getStringValue(dataDefElement, "template"));
        dataDef.setFrom(getStringValue(dataDefElement, "from"));
        dataDef.setTo(getStringValue(dataDefElement, "to"));
        dataDef.setIncrement(getStringValue(dataDefElement, "increment"));
        dataDef.setSelects(getTagValues(dataDefElement, "select"));

        final Element modifiedValuesElement = getElement(dataDefElement, "modified_values");
        if (modifiedValuesElement != null) {
            final NodeList modifiedValueNodeList = modifiedValuesElement.getElementsByTagName("modified_value");

            for (int j = 0; j < modifiedValueNodeList.getLength(); j++) {
                final Element modifiedValueNode = (Element) modifiedValueNodeList.item(j);

                final Integer row = this.getIntValue(modifiedValueNode, "row");
                final String value = getStringValue(modifiedValueNode, "value");

                dataDef.setModifiedValue(row, value);
            }
        }

        repeatTestData.setDataDef(column, dataDef);
    }
}
 
開發者ID:roundrop,項目名稱:ermasterr,代碼行數:44,代碼來源:XMLLoader.java

示例4: loadRepeatTestData

import org.insightech.er.editor.model.testdata.RepeatTestDataDef; //導入方法依賴的package包/類
private void loadRepeatTestData(RepeatTestData repeatTestData,
		Element parent, LoadContext context) {
	Element element = this.getElement(parent, "repeat_test_data");

	int testDataNum = this.getIntegerValue(element, "test_data_num");
	repeatTestData.setTestDataNum(testDataNum);

	Element dataDefListElement = this.getElement(element, "data_def_list");

	NodeList nodeList = dataDefListElement.getElementsByTagName("data_def");

	for (int i = 0; i < nodeList.getLength(); i++) {
		Element dataDefElement = (Element) nodeList.item(i);

		String columnId = this.getStringValue(dataDefElement, "column_id");
		NormalColumn column = context.columnMap.get(columnId);

		RepeatTestDataDef dataDef = new RepeatTestDataDef();

		dataDef.setType(this.getStringValue(dataDefElement, "type"));
		dataDef.setRepeatNum(this.getIntValue(dataDefElement, "repeat_num"));
		dataDef.setTemplate(this.getStringValue(dataDefElement, "template"));
		dataDef.setFrom(this.getStringValue(dataDefElement, "from"));
		dataDef.setTo(this.getStringValue(dataDefElement, "to"));
		dataDef.setIncrement(this.getStringValue(dataDefElement,
				"increment"));
		dataDef.setSelects(this.getTagValues(dataDefElement, "select"));

		Element modifiedValuesElement = this.getElement(dataDefElement,
				"modified_values");
		if (modifiedValuesElement != null) {
			NodeList modifiedValueNodeList = modifiedValuesElement
					.getElementsByTagName("modified_value");

			for (int j = 0; j < modifiedValueNodeList.getLength(); j++) {
				Element modifiedValueNode = (Element) modifiedValueNodeList
						.item(j);

				Integer row = this.getIntValue(modifiedValueNode, "row");
				String value = this.getStringValue(modifiedValueNode,
						"value");

				dataDef.setModifiedValue(row, value);
			}
		}

		repeatTestData.setDataDef(column, dataDef);
	}
}
 
開發者ID:kozake,項目名稱:ermaster-k,代碼行數:50,代碼來源:XMLLoader.java


注:本文中的org.insightech.er.editor.model.testdata.RepeatTestDataDef.setTo方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。