本文整理匯總了Java中com.vaadin.ui.TextField.setImmediate方法的典型用法代碼示例。如果您正苦於以下問題:Java TextField.setImmediate方法的具體用法?Java TextField.setImmediate怎麽用?Java TextField.setImmediate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.vaadin.ui.TextField
的用法示例。
在下文中一共展示了TextField.setImmediate方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: addStringFilters
import com.vaadin.ui.TextField; //導入方法依賴的package包/類
/**
* Ajoute un filtre en TextField sur une liste de colonnes
*
* @param filterRow
* @param container
* @param propertys
*/
private void addStringFilters(String... propertys) {
for (String property : propertys) {
HeaderCell cell = getFilterCell(property);
TextField filterField = new TextField();
filterField.setImmediate(true);
filterField.setWidth(100, Unit.PERCENTAGE);
filterField.addStyleName(ValoTheme.TEXTFIELD_TINY);
filterField.setInputPrompt(applicationContext.getMessage("filter.all", null, UI.getCurrent().getLocale()));
filterField.addTextChangeListener(change -> {
// Can't modify filters so need to replace
container.removeContainerFilters(property);
// (Re)create the filter if necessary
if (!change.getText().isEmpty()) {
container.addContainerFilter(new InsensitiveStringFilter(property, change.getText()));
}
fireFilterListener();
});
cell.setComponent(filterField);
}
}
示例2: getPropertyField
import com.vaadin.ui.TextField; //導入方法依賴的package包/類
@Override
public Field getPropertyField(FormProperty formProperty) {
final TextField textField = new TextField(getPropertyLabel(formProperty));
textField.setRequired(formProperty.isRequired());
textField.setEnabled(formProperty.isWritable());
textField.setRequiredError(getMessage(Messages.FORM_FIELD_REQUIRED, getPropertyLabel(formProperty)));
if (formProperty.getValue() != null) {
textField.setValue(formProperty.getValue());
}
// Add validation of numeric value
textField.addValidator(new LongValidator("Value must be a long"));
textField.setImmediate(true);
return textField;
}
示例3: buildVerticalLayout_2
import com.vaadin.ui.TextField; //導入方法依賴的package包/類
@AutoGenerated
private VerticalLayout buildVerticalLayout_2() {
// common part: create layout
verticalLayout_2 = new VerticalLayout();
verticalLayout_2.setImmediate(false);
verticalLayout_2.setWidth("100.0%");
verticalLayout_2.setHeight("100.0%");
verticalLayout_2.setMargin(false);
// textFieldTestValue
textFieldTestValue = new TextField();
textFieldTestValue.setCaption("Test Value");
textFieldTestValue.setImmediate(true);
textFieldTestValue
.setDescription("Enter a value to match against the regular expression.");
textFieldTestValue.setWidth("-1px");
textFieldTestValue.setHeight("-1px");
textFieldTestValue.setInputPrompt("eg. example");
verticalLayout_2.addComponent(textFieldTestValue);
// buttonTest
buttonTest = new Button();
buttonTest.setCaption("Test");
buttonTest.setImmediate(true);
buttonTest.setWidth("-1px");
buttonTest.setHeight("-1px");
verticalLayout_2.addComponent(buttonTest);
verticalLayout_2.setComponentAlignment(buttonTest, new Alignment(48));
return verticalLayout_2;
}
示例4: createSearchField
import com.vaadin.ui.TextField; //導入方法依賴的package包/類
private TextField createSearchField() {
final TextField textField = new TextFieldBuilder().immediate(true).id(UIComponentIdProvider.CUSTOM_FILTER_QUERY)
.maxLengthAllowed(SPUILabelDefinitions.TARGET_FILTER_QUERY_TEXT_FIELD_LENGTH).buildTextComponent();
textField.addStyleName("target-filter-textfield");
textField.setWidth(900.0F, Unit.PIXELS);
textField.setTextChangeEventMode(TextChangeEventMode.EAGER);
textField.setImmediate(true);
textField.setTextChangeTimeout(100);
return textField;
}
示例5: buildHorizontalLayout_1
import com.vaadin.ui.TextField; //導入方法依賴的package包/類
@AutoGenerated
private HorizontalLayout buildHorizontalLayout_1() {
// common part: create layout
horizontalLayout_1 = new HorizontalLayout();
horizontalLayout_1.setImmediate(false);
horizontalLayout_1.setWidth("-1px");
horizontalLayout_1.setHeight("-1px");
horizontalLayout_1.setMargin(false);
horizontalLayout_1.setSpacing(true);
// comboBoxMin
comboBoxMin = new ComboBox();
comboBoxMin.setCaption("Minimum Type");
comboBoxMin.setImmediate(true);
comboBoxMin.setDescription("Select the type for the minimum.");
comboBoxMin.setWidth("-1px");
comboBoxMin.setHeight("-1px");
horizontalLayout_1.addComponent(comboBoxMin);
// textFieldMin
textFieldMin = new TextField();
textFieldMin.setCaption("Minimum Value");
textFieldMin.setImmediate(true);
textFieldMin.setDescription("Enter a value for the minimum.");
textFieldMin.setWidth("-1px");
textFieldMin.setHeight("-1px");
textFieldMin.setInvalidAllowed(false);
textFieldMin.setInputPrompt("eg. 1");
horizontalLayout_1.addComponent(textFieldMin);
horizontalLayout_1
.setComponentAlignment(textFieldMin, new Alignment(9));
return horizontalLayout_1;
}
示例6: 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;
}
示例7: 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(false);
mainLayout.setSpacing(true);
// top-level component properties
setWidth("-1px");
setHeight("-1px");
// textFieldClassname
textFieldClassname = new TextField();
textFieldClassname.setCaption("Java Classname");
textFieldClassname.setImmediate(false);
textFieldClassname
.setDescription("Java classname of the code implementing the custom PIP.");
textFieldClassname.setWidth("-1px");
textFieldClassname.setHeight("-1px");
textFieldClassname.setInputPrompt("Eg. com.foo.MyPIP");
mainLayout.addComponent(textFieldClassname);
mainLayout.setExpandRatio(textFieldClassname, 1.0f);
// pipParameterComponent
pipParameterComponent = new PIPParameterComponent(this.entity.getEntity());
pipParameterComponent.setImmediate(false);
pipParameterComponent.setWidth("-1px");
pipParameterComponent.setHeight("-1px");
mainLayout.addComponent(pipParameterComponent);
return mainLayout;
}
示例8: buildVerticalLayout_2
import com.vaadin.ui.TextField; //導入方法依賴的package包/類
@AutoGenerated
private VerticalLayout buildVerticalLayout_2() {
// common part: create layout
verticalLayout_2 = new VerticalLayout();
verticalLayout_2.setImmediate(false);
verticalLayout_2.setWidth("100.0%");
verticalLayout_2.setHeight("100.0%");
verticalLayout_2.setMargin(false);
verticalLayout_2.setSpacing(true);
// textFieldTestInput
textFieldTestInput = new TextField();
textFieldTestInput.setCaption("Value");
textFieldTestInput.setImmediate(true);
textFieldTestInput.setDescription("Enter a value to test against.");
textFieldTestInput.setWidth("-1px");
textFieldTestInput.setHeight("-1px");
textFieldTestInput.setInputPrompt("eg. 50");
verticalLayout_2.addComponent(textFieldTestInput);
// buttonValidate
buttonValidate = new Button();
buttonValidate.setCaption("Test");
buttonValidate.setImmediate(true);
buttonValidate
.setDescription("Click to test if value is within the range.");
buttonValidate.setWidth("-1px");
buttonValidate.setHeight("-1px");
verticalLayout_2.addComponent(buttonValidate);
verticalLayout_2.setComponentAlignment(buttonValidate,
new Alignment(48));
return verticalLayout_2;
}
示例9: 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");
// textFieldFilename
textFieldFilename = new TextField();
textFieldFilename.setCaption("Policy File Name");
textFieldFilename.setImmediate(false);
textFieldFilename.setWidth("-1px");
textFieldFilename.setHeight("-1px");
mainLayout.addComponent(textFieldFilename);
// buttonSave
buttonSave = new Button();
buttonSave.setCaption("Save");
buttonSave.setImmediate(false);
buttonSave.setWidth("-1px");
buttonSave.setHeight("-1px");
mainLayout.addComponent(buttonSave);
mainLayout.setComponentAlignment(buttonSave, new Alignment(24));
return mainLayout;
}
示例10: setManufacturerFilter
import com.vaadin.ui.TextField; //導入方法依賴的package包/類
/**
* @param filterRow
*/
private void setManufacturerFilter(HeaderRow filterRow) {
HeaderCell manufacturerFilter = filterRow.getCell(MANUFACTURER);
TextField textField = new TextField();
textField.setImmediate(true);
// On Change of text, trigger filter operation
textField.addTextChangeListener(getManufacturingFilterListener());
manufacturerFilter.setComponent(textField);
}
示例11: buildMainLayout
import com.vaadin.ui.TextField; //導入方法依賴的package包/類
@AutoGenerated
private FormLayout buildMainLayout() {
// common part: create layout
mainLayout = new FormLayout();
mainLayout.setImmediate(false);
mainLayout.setWidth("-1px");
mainLayout.setHeight("-1px");
mainLayout.setMargin(true);
mainLayout.setSpacing(true);
// top-level component properties
setWidth("-1px");
setHeight("-1px");
// textFieldSubdomain
textFieldSubdomain = new TextField();
textFieldSubdomain.setCaption("Enter Sub Domain");
textFieldSubdomain.setImmediate(false);
textFieldSubdomain
.setDescription("You can enter sub domain name - do not use spaces or wildcard characters.");
textFieldSubdomain.setWidth("-1px");
textFieldSubdomain.setHeight("-1px");
textFieldSubdomain.setInvalidAllowed(false);
textFieldSubdomain
.setInputPrompt("Examples: sales hr business marketing.");
mainLayout.addComponent(textFieldSubdomain);
mainLayout.setExpandRatio(textFieldSubdomain, 1.0f);
// buttonSave
buttonSave = new Button();
buttonSave.setCaption("Save");
buttonSave.setImmediate(true);
buttonSave.setWidth("-1px");
buttonSave.setHeight("-1px");
mainLayout.addComponent(buttonSave);
mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
return mainLayout;
}
示例12: 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");
// textFieldExpression
textFieldExpression = new TextField();
textFieldExpression.setCaption("Regular Expression");
textFieldExpression.setImmediate(true);
textFieldExpression
.setDescription("Create a regular expression used to constrain attribute values.");
textFieldExpression.setWidth("-1px");
textFieldExpression.setHeight("-1px");
textFieldExpression.setInvalidAllowed(false);
textFieldExpression.setInputPrompt("eg. [a-zA-Z0-9]");
mainLayout.addComponent(textFieldExpression);
mainLayout.setExpandRatio(textFieldExpression, 1.0f);
// panelTester
panelTester = buildPanelTester();
mainLayout.addComponent(panelTester);
mainLayout.setExpandRatio(panelTester, 1.0f);
return mainLayout;
}
示例13: 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");
// textFieldAttributeID
textFieldAttributeID = new TextField();
textFieldAttributeID.setCaption("Attribute Assignment ID");
textFieldAttributeID.setImmediate(false);
textFieldAttributeID.setWidth("-1px");
textFieldAttributeID.setHeight("-1px");
textFieldAttributeID.setInvalidAllowed(false);
textFieldAttributeID.setRequired(true);
mainLayout.addComponent(textFieldAttributeID);
// textFieldIssuer
textFieldIssuer = new TextField();
textFieldIssuer.setCaption("Issuer (Optional)");
textFieldIssuer.setImmediate(false);
textFieldIssuer.setWidth("-1px");
textFieldIssuer.setHeight("-1px");
textFieldIssuer.setNullSettingAllowed(true);
mainLayout.addComponent(textFieldIssuer);
// tableCategories
tableCategories = new Table();
tableCategories.setCaption("Category (Optional)");
tableCategories.setImmediate(false);
tableCategories.setWidth("100.0%");
tableCategories.setHeight("-1px");
mainLayout.addComponent(tableCategories);
// buttonSave
buttonSave = new Button();
buttonSave.setCaption("Save");
buttonSave.setImmediate(false);
buttonSave.setWidth("-1px");
buttonSave.setHeight("-1px");
mainLayout.addComponent(buttonSave);
mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
return mainLayout;
}
示例14: 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");
// textFieldName
textFieldName = new TextField();
textFieldName.setCaption("Parameter Name");
textFieldName.setImmediate(false);
textFieldName.setWidth("-1px");
textFieldName.setHeight("-1px");
textFieldName.setInvalidAllowed(false);
textFieldName.setRequired(true);
mainLayout.addComponent(textFieldName);
// textFieldValue
textFieldValue = new TextField();
textFieldValue.setCaption("Parameter Value");
textFieldValue.setImmediate(false);
textFieldValue.setWidth("-1px");
textFieldValue.setHeight("-1px");
textFieldValue.setInvalidAllowed(false);
textFieldValue.setRequired(true);
mainLayout.addComponent(textFieldValue);
// buttonSave
buttonSave = new Button();
buttonSave.setCaption("Save");
buttonSave.setImmediate(true);
buttonSave.setWidth("-1px");
buttonSave.setHeight("-1px");
mainLayout.addComponent(buttonSave);
mainLayout.setComponentAlignment(buttonSave, new Alignment(48));
return mainLayout;
}
示例15: 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");
// textAreaSelect
textAreaSelect = new TextArea();
textAreaSelect.setCaption("SQL Select Statement");
textAreaSelect.setImmediate(false);
textAreaSelect.setWidth("100.0%");
textAreaSelect.setHeight("-1px");
textAreaSelect.setInvalidAllowed(false);
textAreaSelect.setRequired(true);
mainLayout.addComponent(textAreaSelect);
mainLayout.setExpandRatio(textAreaSelect, 1.0f);
// textFieldBase
textFieldBase = new TextField();
textFieldBase.setCaption("Base DN");
textFieldBase.setImmediate(false);
textFieldBase.setWidth("-1px");
textFieldBase.setHeight("-1px");
mainLayout.addComponent(textFieldBase);
// textFieldFilter
textFieldFilter = new TextField();
textFieldFilter.setCaption("Filter");
textFieldFilter.setImmediate(false);
textFieldFilter.setWidth("-1px");
textFieldFilter.setHeight("-1px");
mainLayout.addComponent(textFieldFilter);
// checkBoxShortIds
checkBoxShortIds = new CheckBox();
checkBoxShortIds.setCaption("Display short id’s.");
checkBoxShortIds.setImmediate(false);
checkBoxShortIds.setWidth("-1px");
checkBoxShortIds.setHeight("-1px");
mainLayout.addComponent(checkBoxShortIds);
// tableRequiredAttributes
tableRequiredAttributes = new Table();
tableRequiredAttributes.setCaption("Attributes Returned");
tableRequiredAttributes.setImmediate(false);
tableRequiredAttributes.setWidth("-1px");
tableRequiredAttributes.setHeight("-1px");
mainLayout.addComponent(tableRequiredAttributes);
// tableAttributes
tableAttributes = new Table();
tableAttributes.setCaption("Parameters - Attributes Needed (i.e. ?)");
tableAttributes.setImmediate(false);
tableAttributes.setWidth("-1px");
tableAttributes.setHeight("-1px");
tableAttributes.setInvalidAllowed(false);
tableAttributes.setRequired(true);
mainLayout.addComponent(tableAttributes);
return mainLayout;
}