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


Java NameValue类代码示例

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


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

示例1: perfomeOK

import org.insightech.er.util.NameValue; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected void perfomeOK() {
    modelProperties.clear();

    for (int i = 0; i < table.getItemCount(); i++) {
        final TableItem item = table.getItem(i);

        if (Check.isEmpty(item.getText(0)) && Check.isEmpty(item.getText(1))) {
            continue;
        }

        final NameValue property = new NameValue(item.getText(0), item.getText(1));
        modelProperties.addProperty(property);
    }
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:19,代码来源:ModelPropertiesDialog.java

示例2: search

import org.insightech.er.util.NameValue; //导入依赖的package包/类
private List<SearchResultRow> search(final ModelProperties modelProperties, final String keyword) {
    final List<SearchResultRow> rows = new ArrayList<SearchResultRow>();

    if (modelPropertiesCheckBox) {

        final String path = null;

        for (final NameValue property : modelProperties.getProperties()) {
            if (this.search(property.getName(), keyword)) {
                rows.add(new SearchResultRow(SearchResultRow.TYPE_MODEL_PROPERTY_NAME, property.getName(), path, property, modelProperties));
            }

            if (this.search(property.getValue(), keyword)) {
                rows.add(new SearchResultRow(SearchResultRow.TYPE_MODEL_PROPERTY_VALUE, property.getValue(), path, property, modelProperties));
            }
        }
    }

    return rows;
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:21,代码来源:SearchManager.java

示例3: loadModelProperties

import org.insightech.er.util.NameValue; //导入依赖的package包/类
private void loadModelProperties(final ModelProperties modelProperties, final Element parent, final LoadContext context) {
    final Element element = getElement(parent, "model_properties");

    loadLocation(modelProperties, element);
    loadColor(modelProperties, element);
    loadFont(modelProperties, element);

    modelProperties.setDisplay(this.getBooleanValue(element, "display", false));
    modelProperties.setCreationDate(getDateValue(element, "creation_date"));
    //modelProperties.setUpdatedDate(getDateValue(element, "updated_date"));
    modelProperties.setUpdatedDate(context.getUpdatedDate());

    final NodeList nodeList = element.getElementsByTagName("model_property");

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

        final NameValue nameValue = new NameValue(getStringValue(propertyElement, "name"), getStringValue(propertyElement, "value"));

        modelProperties.addProperty(nameValue);
    }
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:23,代码来源:XMLLoader.java

示例4: perfomeOK

import org.insightech.er.util.NameValue; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected void perfomeOK() {
	this.modelProperties.clear();

	for (int i = 0; i < this.table.getItemCount(); i++) {
		TableItem item = this.table.getItem(i);

		if (Check.isEmpty(item.getText(0))
				&& Check.isEmpty(item.getText(1))) {
			continue;
		}

		NameValue property = new NameValue(item.getText(0), item.getText(1));
		this.modelProperties.addProperty(property);
	}
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:20,代码来源:ModelPropertiesDialog.java

示例5: createXML

import org.insightech.er.util.NameValue; //导入依赖的package包/类
private String createXML(ModelProperties modelProperties,
		PersistentContext context) {
	StringBuilder xml = new StringBuilder();

	xml.append("<model_properties>\n");

	xml.append(tab(this.createXMLNodeElement(modelProperties, context)));

	xml.append("\t<display>").append(modelProperties.isDisplay())
			.append("</display>\n");
	xml.append("\t<creation_date>")
			.append(DATE_FORMAT.format(modelProperties.getCreationDate()))
			.append("</creation_date>\n");
	xml.append("\t<updated_date>")
			.append(DATE_FORMAT.format(modelProperties.getUpdatedDate()))
			.append("</updated_date>\n");

	for (NameValue property : modelProperties.getProperties()) {
		xml.append(tab(this.createXML(property, context)));
	}

	xml.append("</model_properties>\n");

	return xml.toString();
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:26,代码来源:PersistentXmlImpl.java

示例6: setData

import org.insightech.er.util.NameValue; //导入依赖的package包/类
@Override
protected void setData() {
    for (final NameValue property : modelProperties.getProperties()) {
        final TableItem item = new TableItem(table, SWT.NULL);
        item.setText(0, Format.null2blank(property.getName()));
        item.setText(1, Format.null2blank(property.getValue()));
    }
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:9,代码来源:ModelPropertiesDialog.java

示例7: setData

import org.insightech.er.util.NameValue; //导入依赖的package包/类
public void setData(final List<NameValue> properties, final Date creationDate, final Date updatedDate, final String tableStyle, final int[] color) {
    removeAll();

    decideColor(color);

    for (final NameValue property : properties) {
        addRow(property.getName(), property.getValue(), tableStyle);
    }

    addRow(ResourceString.getResourceString("label.creation.date"), DATE_FORMAT.format(creationDate), tableStyle);
    addRow(ResourceString.getResourceString("label.updated.date"), DATE_FORMAT.format(updatedDate), tableStyle);
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:13,代码来源:ModelPropertiesFigure.java

示例8: ModelProperties

import org.insightech.er.util.NameValue; //导入依赖的package包/类
public ModelProperties() {
    creationDate = new Date();
    updatedDate = new Date();

    setLocation(new Location(50, 50, -1, -1));

    properties = new ArrayList<NameValue>();
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:9,代码来源:ModelProperties.java

示例9: init

import org.insightech.er.util.NameValue; //导入依赖的package包/类
public void init() {
    properties.add(new NameValue(ResourceString.getResourceString("label.project.name"), ""));
    properties.add(new NameValue(ResourceString.getResourceString("label.model.name"), ""));
    properties.add(new NameValue(ResourceString.getResourceString("label.version"), ""));
    properties.add(new NameValue(ResourceString.getResourceString("label.company.name"), ""));
    properties.add(new NameValue(ResourceString.getResourceString("label.author"), ""));
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:8,代码来源:ModelProperties.java

示例10: setData

import org.insightech.er.util.NameValue; //导入依赖的package包/类
@Override
protected void setData() {
	for (NameValue property : this.modelProperties.getProperties()) {
		TableItem item = new TableItem(table, SWT.NULL);
		item.setText(0, Format.null2blank(property.getName()));
		item.setText(1, Format.null2blank(property.getValue()));
	}
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:9,代码来源:ModelPropertiesDialog.java

示例11: setData

import org.insightech.er.util.NameValue; //导入依赖的package包/类
public void setData(List<NameValue> properties, Date creationDate,
		Date updatedDate, String tableStyle, int[] color) {
	this.removeAll();

	this.decideColor(color);

	for (NameValue property : properties) {
		this.addRow(property.getName(), property.getValue(), tableStyle);
	}

	this.addRow(ResourceString.getResourceString("label.creation.date"),
			DATE_FORMAT.format(creationDate), tableStyle);
	this.addRow(ResourceString.getResourceString("label.updated.date"),
			DATE_FORMAT.format(updatedDate), tableStyle);
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:16,代码来源:ModelPropertiesFigure.java

示例12: ModelProperties

import org.insightech.er.util.NameValue; //导入依赖的package包/类
public ModelProperties() {
	this.creationDate = new Date();
	this.updatedDate = new Date();

	this.setLocation(null, new Location(50, 50, -1, -1));

	this.properties = new ArrayList<NameValue>();
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:9,代码来源:ModelProperties.java

示例13: init

import org.insightech.er.util.NameValue; //导入依赖的package包/类
public void init() {
	properties.add(new NameValue(ResourceString
			.getResourceString("label.project.name"), ""));
	properties.add(new NameValue(ResourceString
			.getResourceString("label.model.name"), ""));
	properties.add(new NameValue(ResourceString
			.getResourceString("label.version"), ""));
	properties.add(new NameValue(ResourceString
			.getResourceString("label.company.name"), ""));
	properties.add(new NameValue(ResourceString
			.getResourceString("label.author"), ""));
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:13,代码来源:ModelProperties.java

示例14: search

import org.insightech.er.util.NameValue; //导入依赖的package包/类
private List<SearchResultRow> search(ModelProperties modelProperties,
		String keyword) {
	List<SearchResultRow> rows = new ArrayList<SearchResultRow>();

	if (this.modelPropertiesCheckBox) {

		String path = null;

		for (NameValue property : modelProperties.getProperties()) {
			if (this.search(property.getName(), keyword)) {
				rows
						.add(new SearchResultRow(
								SearchResultRow.TYPE_MODEL_PROPERTY_NAME,
								property.getName(), path, property,
								modelProperties));
			}

			if (this.search(property.getValue(), keyword)) {
				rows.add(new SearchResultRow(
						SearchResultRow.TYPE_MODEL_PROPERTY_VALUE, property
								.getValue(), path, property,
						modelProperties));
			}
		}
	}

	return rows;
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:29,代码来源:SearchManager.java

示例15: loadModelProperties

import org.insightech.er.util.NameValue; //导入依赖的package包/类
private void loadModelProperties(ModelProperties modelProperties,
		Element parent) {
	Element element = this.getElement(parent, "model_properties");

	this.loadLocation(modelProperties, element);
	this.loadColor(modelProperties, element);
	this.loadFont(modelProperties, element);

	modelProperties.setDisplay(this.getBooleanValue(element, "display",
			false));
	modelProperties.setCreationDate(this.getDateValue(element,
			"creation_date"));
	modelProperties.setUpdatedDate(this.getDateValue(element,
			"updated_date"));

	NodeList nodeList = element.getElementsByTagName("model_property");

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

		NameValue nameValue = new NameValue(this.getStringValue(
				propertyElement, "name"), this.getStringValue(
				propertyElement, "value"));

		modelProperties.addProperty(nameValue);
	}
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:28,代码来源:XMLLoader.java


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