本文整理汇总了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);
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例6: FieldWrapper
import com.vaadin.ui.Field; //导入方法依赖的package包/类
public FieldWrapper(Field<T> innerField)
{
this.innerField = innerField;
this.setCaption(innerField.getCaption());
innerField.setCaption(null);
}
示例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;
}