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


Java Field.setCaption方法代码示例

本文整理汇总了Java中com.vaadin.ui.Field.setCaption方法的典型用法代码示例。如果您正苦于以下问题:Java Field.setCaption方法的具体用法?Java Field.setCaption怎么用?Java Field.setCaption使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.vaadin.ui.Field的用法示例。


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

示例1: replaceFields

import com.vaadin.ui.Field; //导入方法依赖的package包/类
/**
 * replace the fields in the fieldbinder in this SearchFieldManager
 */
public void replaceFields() {
    makeSearchFieldsFromFieldBinder();

    for (Map.Entry<Object, SearchPatternField<?,?>> e : getPropertyIdToSearchPatternField().entrySet()) {
        Object propertyId = e.getKey();
        Field<?> replacement = e.getValue();
        Field<?> original = fieldBinder.getPropertyIdToFieldBindings().get(propertyId);

        // this should be moved somewhere else
        replacement.setCaption(original.getCaption());
        replacement.setWidth(original.getWidth(), original.getWidthUnits());

        replace(original, replacement);
    }
}
 
开发者ID:tyl,项目名称:field-binder,代码行数:19,代码来源:FieldBinderSearchFieldManager.java

示例2: createField

import com.vaadin.ui.Field; //导入方法依赖的package包/类
@Override
public Field createField(Container container, Object itemId, Object propertyId, Component uiContext) {
	Property containerProperty = container.getContainerProperty(itemId, propertyId);
	Class<?> type = containerProperty.getType();
	Field field = createFieldByPropertyType(type);
	field.setCaption(createCaptionByPropertyId(propertyId));
	return field;
}
 
开发者ID:frincon,项目名称:openeos,代码行数:9,代码来源:DefaultVaadinFieldFactory.java

示例3: createField

import com.vaadin.ui.Field; //导入方法依赖的package包/类
@Override
public Field createField(Item item, Object propertyId, Component uiContext) {
	Field field = super.createField(item, propertyId, uiContext);
	if (propertyId.equals(SchuelerPojo.VORNAME_COLUMN)) {
		field.setCaption("Vorname: ");
		field.setRequired(true);
	} else if (propertyId.equals(SchuelerPojo.NAME_COLUMN)) {
		field.setCaption("Name: ");
		field.setRequired(true);
	} else if (propertyId.equals(SchuelerPojo.VERSETZUNGSVERMERK_COLUMN)) {
		field.setCaption((String) item.getItemProperty(SchuelerPojo.VORNAME_COLUMN).getValue());
	}
	return field;
}
 
开发者ID:fossaag,项目名称:rolp,代码行数:15,代码来源:SchuelerVerwaltenFormFields.java

示例4: createField

import com.vaadin.ui.Field; //导入方法依赖的package包/类
@Override
public Field createField(Item item, Object propertyId, Component uiContext) {
	Field field = super.createField(item, propertyId, uiContext);
	if (propertyId.equals(KlassePojo.KLASSENNAME_COLUMN)) {
		field.setCaption("Klassenbezeichnung: ");
		field.setRequired(true);
	} 
	else if (propertyId.equals(KlassePojo.KLASSENTYP_COLUMN)) {
		Select select = new Select("Klassentyp: ");
		KlassentypPojoContainer klassentypen = KlassentypPojoContainer.getInstance();	
		select.setContainerDataSource(klassentypen);
		KlassentypPojo currentKlassentyp = (KlassentypPojo) item.getItemProperty(KlassePojo.KLASSENTYP_COLUMN).getValue();
		select.setPropertyDataSource(item.getItemProperty(propertyId));
		for (KlassentypPojo klassentyp : klassentypen.getItemIds()) {
			select.setItemCaption(klassentyp, klassentyp.getKlassentyp());
			if (currentKlassentyp != null && klassentyp.getId().equals(currentKlassentyp.getId())) {
				select.select(klassentyp);
			} else if (currentKlassentyp == null && klassentyp.isKlassenstufenorientiert()) {
				select.select(klassentyp);
			}
		}

		select.setNullSelectionAllowed(false);
		select.setRequired(true);
		return select;
	} 
	return field;	
}
 
开发者ID:fossaag,项目名称:rolp,代码行数:29,代码来源:KlasseAnlegenFormFields.java

示例5: createField

import com.vaadin.ui.Field; //导入方法依赖的package包/类
@Override
public Field createField(Container container, Object itemId, Object propertyId, Component uiContext) {
	Field field = super.createField(container.getItem(itemId), propertyId, uiContext);
	if (propertyId.equals(ZuordnungFachSchuelerHandler.ZUGEORDNET_COLUMN)) {
		field.setCaption(ZuordnungFachSchuelerContainer.ZUGEORDNET_CAPTION);
	}
	return field;
}
 
开发者ID:fossaag,项目名称:rolp,代码行数:9,代码来源:FachSchuelerZuordnenFieldFactory.java

示例6: FieldWrapper

import com.vaadin.ui.Field; //导入方法依赖的package包/类
public FieldWrapper(Field<T> innerField)
{
    this.innerField = innerField;
    this.setCaption(innerField.getCaption());
    innerField.setCaption(null);
}
 
开发者ID:sensiasoft,项目名称:sensorhub,代码行数:7,代码来源:FieldWrapper.java

示例7: postProcessField

import com.vaadin.ui.Field; //导入方法依赖的package包/类
/**
 * Post process created {@link Field} for additional setup
 * @param <F> Field type
 * @param field Field to process
 * @param property Property
 * @return processed field
 */
@SuppressWarnings("unchecked")
protected <F> Field<F> postProcessField(Field field, Property<T> property) {
	// caption
	field.setCaption(LocalizationContext.translate(property, true));
	return field;
}
 
开发者ID:holon-platform,项目名称:holon-vaadin7,代码行数:14,代码来源:DefaultFieldPropertyRenderer.java


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