本文整理汇总了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);
}
示例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));
}
示例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());
}
}
示例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));
}
示例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));
}
示例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));
}