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


Java FieldDescriptor类代码示例

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


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

示例1: add

import org.bubblecloud.ilves.component.grid.FieldDescriptor; //导入依赖的package包/类
/**
 * Adds a field descriptor for given entity class.
 * @param entityClass The entity class.
 * @param fieldDescriptor The field descriptor to add.
 */
public static void add(final Class<?> entityClass, final FieldDescriptor fieldDescriptor) {
    if (!fieldDescriptors.containsKey(entityClass)) {
        fieldDescriptors.put(entityClass, new ArrayList<FieldDescriptor>());
    }
    fieldDescriptors.get(entityClass).add(fieldDescriptor);
}
 
开发者ID:bubblecloud,项目名称:ilves,代码行数:12,代码来源:SiteFields.java

示例2: getFieldDescriptors

import org.bubblecloud.ilves.component.grid.FieldDescriptor; //导入依赖的package包/类
/**
 * Gets field descriptors for given entity class.
 * @param entityClass The entity class.
 * @return an unmodifiable list of field descriptors.
 */
public static List<FieldDescriptor> getFieldDescriptors(final Class<?> entityClass) {
    if (!fieldDescriptors.containsKey(entityClass)) {
        throw new SiteException("No fields defined for class: " + entityClass.getCanonicalName());
    }
    return Collections.unmodifiableList(fieldDescriptors.get(entityClass));
}
 
开发者ID:bubblecloud,项目名称:ilves,代码行数:12,代码来源:SiteFields.java

示例3: addContainerProperties

import org.bubblecloud.ilves.component.grid.FieldDescriptor; //导入依赖的package包/类
/**
 * Utility methods for setting container properties based on field descriptors.
 *
 * @param container the container
 * @param fieldDescriptors the field descriptors
 */
public static void addContainerProperties(final LazyQueryContainer container,
                                          final List<FieldDescriptor> fieldDescriptors) {
    for (final FieldDescriptor fieldDescriptor : fieldDescriptors) {
        container.addContainerProperty(
                fieldDescriptor.getId(),
                fieldDescriptor.getValueType(),
                fieldDescriptor.getDefaultValue(),
                fieldDescriptor.isReadOnly(),
                fieldDescriptor.isSortable());
    }
}
 
开发者ID:bubblecloud,项目名称:ilves,代码行数:18,代码来源:ContainerUtil.java

示例4: initialize

import org.bubblecloud.ilves.component.grid.FieldDescriptor; //导入依赖的package包/类
/**
 * Initialize field descriptors if not done yet.
 */
public static synchronized void initialize() {
    if (initialized) {
        return;
    }
    initialized = true;

    HootFields.add(Entry.class, new FieldDescriptor(
            "entryId", "Entry ID",
            TextField.class, null,
            100, null, String.class, null,
            true, false, false));

    HootFields.add(Entry.class, new FieldDescriptor(
            "path", "Path",
            TextField.class, null,
            250, null, String.class, "",
            true, true, true));
    HootFields.add(Entry.class, new FieldDescriptor(
            "basename", "Basename",
            TextField.class, null,
            100, null, String.class, "",
            true, true, true));
    HootFields.add(Entry.class, new FieldDescriptor(
            "language", "Language",
            TextField.class, null,
            75, null, String.class, "",
            true, true, false));
    HootFields.add(Entry.class, new FieldDescriptor(
            "country", "Country",
            TextField.class, null,
            75, null, String.class, "",
            true, true, false));
    HootFields.add(Entry.class, new FieldDescriptor(
            "key", "Key",
            TextField.class, null,
            -1, null, String.class, "",
            true, true, true));
    HootFields.add(Entry.class, new FieldDescriptor(
            "value", "Value",
            TextArea.class, null,
            300, null, String.class, "",
            false, true, true));
    HootFields.add(Entry.class, new FieldDescriptor(
            "author", "Author",
            TextField.class, null,
            100, null, String.class, "",
            true, true, false));

    HootFields.add(Entry.class, new FieldDescriptor(
            "created", "Created",
            TimestampField.class, new TimestampConverter(),
            150, null, Date.class, null, true,
            true, true));
    HootFields.add(Entry.class, new FieldDescriptor(
            "modified", "Modified",
            TimestampField.class, new TimestampConverter(),
            150, null, Date.class, null,
            true, true, true));
    HootFields.add(Entry.class, new FieldDescriptor(
            "deleted", "Deleted",
            TimestampField.class, new TimestampConverter(),
            150, null, Date.class, null,
            true, true, true));

}
 
开发者ID:bubblecloud,项目名称:hoot-bundle-translation-site,代码行数:69,代码来源:HootFields.java

示例5: initialize

import org.bubblecloud.ilves.component.grid.FieldDescriptor; //导入依赖的package包/类
/**
 * Initialize field descriptors if not done yet.
 */
public static synchronized void initialize() {
    if (initialized) {
        return;
    }
    initialized = true;

    TranslationFields.add(Entry.class, new FieldDescriptor(
            "entryId", "Entry ID",
            TextField.class, null,
            100, null, String.class, null,
            true, false, false));

    TranslationFields.add(Entry.class, new FieldDescriptor(
            "path", "Path",
            TextField.class, null,
            250, null, String.class, "",
            true, true, true));
    TranslationFields.add(Entry.class, new FieldDescriptor(
            "basename", "Basename",
            TextField.class, null,
            100, null, String.class, "",
            true, true, true));
    TranslationFields.add(Entry.class, new FieldDescriptor(
            "language", "Language",
            TextField.class, null,
            75, null, String.class, "",
            true, true, false));
    TranslationFields.add(Entry.class, new FieldDescriptor(
            "country", "Country",
            TextField.class, null,
            75, null, String.class, "",
            true, true, false));
    TranslationFields.add(Entry.class, new FieldDescriptor(
            "key", "Key",
            TextField.class, null,
            -1, null, String.class, "",
            true, true, true));
    TranslationFields.add(Entry.class, new FieldDescriptor(
            "value", "Value",
            TextArea.class, null,
            300, null, String.class, "",
            false, true, true));
    TranslationFields.add(Entry.class, new FieldDescriptor(
            "author", "Author",
            TextField.class, null,
            100, null, String.class, "",
            true, true, false));

    TranslationFields.add(Entry.class, new FieldDescriptor(
            "created", "Created",
            TimestampField.class, new TimestampConverter(),
            150, null, Date.class, null, true,
            true, true));
    TranslationFields.add(Entry.class, new FieldDescriptor(
            "modified", "Modified",
            TimestampField.class, new TimestampConverter(),
            150, null, Date.class, null,
            true, true, true));
    TranslationFields.add(Entry.class, new FieldDescriptor(
            "deleted", "Deleted",
            TimestampField.class, new TimestampConverter(),
            150, null, Date.class, null,
            true, true, false));

}
 
开发者ID:tlaukkan,项目名称:groom-code-review-site,代码行数:69,代码来源:TranslationFields.java

示例6: getFieldDescriptors

import org.bubblecloud.ilves.component.grid.FieldDescriptor; //导入依赖的package包/类
/**
 * Gets field descriptors for given entity class.
 * @param entityClass The entity class.
 * @return an unmodifiable list of field descriptors.
 */
public static List<FieldDescriptor> getFieldDescriptors(final Class<?> entityClass) {
    return Collections.unmodifiableList(fieldDescriptors.get(entityClass));
}
 
开发者ID:bubblecloud,项目名称:hoot-bundle-translation-site,代码行数:9,代码来源:HootFields.java


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