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


Java TextField.setNullRepresentation方法代码示例

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


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

示例1: SearchAnneeUnivApoField

import com.vaadin.ui.TextField; //导入方法依赖的package包/类
/**
 * Constructeur, initialisation du champs
 * @param libelleBtnFind 
 */
public SearchAnneeUnivApoField(String libelleBtnFind) {
	super();
	layout = new HorizontalLayout();
	layout.setSpacing(true);
	anneeField = new TextField();
	anneeField.addValueChangeListener(e->showOrHideError());
	anneeField.setNullRepresentation("");
	anneeField.setReadOnly(true);
	btnSearch = new OneClickButton(libelleBtnFind,FontAwesome.SEARCH);
	btnSearch.addClickListener(e->{
		SearchAnneeUnivApoWindow window = new SearchAnneeUnivApoWindow();
		window.addAnneeUniListener(a->changeFieldValue(a));
		UI.getCurrent().addWindow(window);
	});
	layout.addComponent(anneeField);
	layout.addComponent(btnSearch);
}
 
开发者ID:EsupPortail,项目名称:esup-ecandidat,代码行数:22,代码来源:SearchAnneeUnivApoField.java

示例2: getSecurityTokenLayout

import com.vaadin.ui.TextField; //导入方法依赖的package包/类
private HorizontalLayout getSecurityTokenLayout(final String securityToken) {
    final HorizontalLayout securityTokenLayout = new HorizontalLayout();

    final Label securityTableLbl = new Label(
            SPUIComponentProvider.getBoldHTMLText(getI18n().getMessage("label.target.security.token")),
            ContentMode.HTML);
    securityTableLbl.addStyleName(SPUIDefinitions.TEXT_STYLE);
    securityTableLbl.addStyleName("label-style");

    final TextField securityTokentxt = new TextField();
    securityTokentxt.addStyleName(ValoTheme.TEXTFIELD_BORDERLESS);
    securityTokentxt.addStyleName(ValoTheme.TEXTFIELD_TINY);
    securityTokentxt.addStyleName("targetDtls-securityToken");
    securityTokentxt.addStyleName(SPUIDefinitions.TEXT_STYLE);
    securityTokentxt.setCaption(null);
    securityTokentxt.setNullRepresentation("");
    securityTokentxt.setValue(securityToken);
    securityTokentxt.setReadOnly(true);

    securityTokenLayout.addComponent(securityTableLbl);
    securityTokenLayout.addComponent(securityTokentxt);
    return securityTokenLayout;
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:24,代码来源:TargetDetails.java

示例3: RequiredColorPickerField

import com.vaadin.ui.TextField; //导入方法依赖的package包/类
/**
 * Constructeur, initialisation du champs
 */
public RequiredColorPickerField(String caption) {
	super();
	layout = new HorizontalLayout();
	layout.setWidth(100, Unit.PERCENTAGE);
	layout.setSpacing(true);
	colorTextField = new TextField();
	colorTextField.addValueChangeListener(e->showOrHideError());
	colorTextField.setNullRepresentation("");
	colorTextField.addStyleName(ValoTheme.TEXTFIELD_BORDERLESS);
	colorTextField.setReadOnly(true);

	btnColor = new ColorPicker("Couleur de l'alerte");
	btnColor.addColorChangeListener(e->{
		changeFieldValue(e.getColor().getCSS());
	});
	btnColor.setPosition(Page.getCurrent().getBrowserWindowWidth() / 2 - 246/2,
               Page.getCurrent().getBrowserWindowHeight() / 2 - 507/2);
	btnColor.setSwatchesVisibility(true);
	btnColor.setHistoryVisibility(false);
	btnColor.setTextfieldVisibility(true);
	btnColor.setHSVVisibility(false);
	layout.addComponent(btnColor);
	layout.addComponent(colorTextField);
	layout.setExpandRatio(colorTextField, 1);
	
}
 
开发者ID:EsupPortail,项目名称:esup-ecandidat,代码行数:30,代码来源:RequiredColorPickerField.java

示例4: buildMainLayout

import com.vaadin.ui.TextField; //导入方法依赖的package包/类
@AutoGenerated
private VerticalLayout buildMainLayout() {
	// common part: create layout
	mainLayout = new VerticalLayout();
	mainLayout.setImmediate(false);
	mainLayout.setWidth("-1px");
	mainLayout.setHeight("-1px");
	mainLayout.setMargin(true);
	mainLayout.setSpacing(true);
	
	// top-level component properties
	setWidth("-1px");
	setHeight("-1px");
	
	// textFieldID
	textFieldID = new TextField();
	textFieldID.setCaption("Variable ID");
	textFieldID.setImmediate(false);
	textFieldID.setWidth("-1px");
	textFieldID.setHeight("-1px");
	textFieldID.setInvalidAllowed(false);
	textFieldID.setRequired(true);
	textFieldID.setNullRepresentation("");
	mainLayout.addComponent(textFieldID);
	
	// buttonSave
	buttonSave = new Button();
	buttonSave.setCaption("Save and Continue");
	buttonSave.setImmediate(false);
	buttonSave.setWidth("-1px");
	buttonSave.setHeight("-1px");
	mainLayout.addComponent(buttonSave);
	mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
	
	return mainLayout;
}
 
开发者ID:apache,项目名称:incubator-openaz,代码行数:37,代码来源:VariableDefinitionEditorWindow.java

示例5: createIntegerTextField

import com.vaadin.ui.TextField; //导入方法依赖的package包/类
private TextField createIntegerTextField(final String in18Key, final String id) {
    final TextField textField = createTextField(in18Key, id);
    textField.setNullRepresentation("");
    textField.setConverter(new StringToIntegerConverter());
    textField.setConversionError(i18n.getMessage(MESSAGE_ENTER_NUMBER));
    textField.setSizeUndefined();
    return textField;
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:9,代码来源:AddUpdateRolloutWindowLayout.java

示例6: createPercentageField

import com.vaadin.ui.TextField; //导入方法依赖的package包/类
private TextField createPercentageField(final String in18Key, final String id) {
    final TextField textField = new TextFieldBuilder().prompt(i18n.getMessage(in18Key)).immediate(true).id(id)
            .buildTextComponent();
    textField.setWidth(80, Unit.PIXELS);
    textField.setNullRepresentation("");
    textField.setConverter(new StringToIntegerConverter());
    textField.addValidator(this::validateMandatoryPercentage);
    return textField;
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:10,代码来源:DefineGroupsLayout.java

示例7: getTextField

import com.vaadin.ui.TextField; //导入方法依赖的package包/类
/**
 * By default you can use the fields that are generated by
 * {@link BeanFieldGroup} but in case you require something to be customized
 * then this is how you initialize
 * 
 * @param caption
 * @param bindName
 * @return
 */
private TextField getTextField(String caption, String bindName) {
	TextField textField = new TextField(caption);
	textField.setImmediate(true);
	fieldGroup.bind(textField, bindName);
	textField.setValidationVisible(false);
	textField.setNullRepresentation(TEXT_NULL_REPRESENTATION);
	return textField;

}
 
开发者ID:KrishnaPhani,项目名称:KrishnasSpace,代码行数:19,代码来源:BasicFormImpl.java

示例8: createTextField

import com.vaadin.ui.TextField; //导入方法依赖的package包/类
private TextField createTextField(final String in18Key, final String id) {
    final TextField buildTextField = new TextFieldBuilder().caption(i18n.getMessage(in18Key)).required(true)
            .prompt(i18n.getMessage(in18Key)).immediate(true).id(id).buildTextComponent();
    buildTextField.setNullRepresentation("");
    return buildTextField;
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:7,代码来源:DistributionAddUpdateWindowLayout.java


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