當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。