/** * Constructs a new <code>TextField</code> with the given caption and * initial text contents. * * @param caption * the caption <code>String</code> for the editor. * @param value * the initial text content of the editor, not {@code null} */ public TextField(String caption, String value) { setValue(value); setCaption(caption); }
/** * @see com.vaadin.data.Property#setValue(java.lang.Object) */ public void setValue(String newValue) throws com.vaadin.data.Property.ReadOnlyException { m_principalName.setValue(newValue); }
/** * Add key. * * @param key the key to be used * @return the instance itself */ public KeyValueInputDialogWindow withKey(String key) { m_keyInputField.setValue(key); return this; }
field.setValue(colorCSS); field.setComponentError(null);
/** * Sets the value.<p> * * @param fireChange <code>true</code> to fire the value change event * @param value the value to set */ protected void setValue(boolean fireChange, String value) { m_textField.setValue(value); fireValueChange(false); } }
private void updateTimeField(Date date) { if(StringUtils.isEmpty((String)timeField.getValue()) && initWithEmptyHour) return; timeField.setValue(date != null ? dateFormat.format(date) : null); }
@Override public void run() { String privilegeName = (String) newPrivilegeNameField.getValue(); PermissionDefinition definition = new PermissionDefinition(privilegeName); if (getUsedPermissionDefinition().contains(definition)) { // this definition is already used return; } newPrivilegeNameField.setValue(null); addNewPrivilegeEditor(definition); } }
/** * Sets the path of the edited file in the corresponding display. * @param editedFilePath path of the edited file to set. */ public void setEditedFilePath(final String editedFilePath) { m_filePathField.setReadOnly(false); m_filePathField.setValue(editedFilePath); m_filePathField.setReadOnly(true); }
/** * Method, used for validity check, when schedule text is changed. * * @param event * (@link TextChangeEvent} the event object after schedule text * change. * @return validity of maintenance window controls. */ public boolean onScheduleChange(final TextChangeEvent event) { schedule.setValue(event.getText()); return isScheduleAndDurationValid(); }
/** * Method, used for validity check, when schedule text is changed. * * @param event * (@link TextChangeEvent} the event object after schedule text * change. * @return validity of maintenance window controls. */ public boolean onScheduleChange(final TextChangeEvent event) { schedule.setValue(event.getText()); return isScheduleAndDurationValid(); }
private void restoreState() { final String onLoadSearchBoxValue = onLoadSearchBoxValue(); if (!StringUtils.isEmpty(onLoadSearchBoxValue)) { openSearchTextField(); searchField.setValue(onLoadSearchBoxValue); } restoreCaption(); }
private TextField createTriggerThreshold() { final TextField thresholdField = createIntegerTextField("prompt.tigger.threshold", UIComponentIdProvider.ROLLOUT_TRIGGER_THRESOLD_ID); thresholdField.addValidator(new ThresholdFieldValidator()); thresholdField.setValue(defaultRolloutGroupConditions.getSuccessConditionExp()); return thresholdField; }
private void populateValuesOfTarget(final Target target) { resetComponents(); this.controllerId = target.getControllerId(); editTarget = Boolean.TRUE; controllerIDTextField.setValue(target.getControllerId()); controllerIDTextField.setEnabled(Boolean.FALSE); nameTextField.setValue(target.getName()); nameTextField.setRequired(true); descTextArea.setValue(target.getDescription()); }
private TextField createTriggerThreshold() { final TextField thresholdField = createIntegerTextField("prompt.tigger.threshold", UIComponentIdProvider.ROLLOUT_TRIGGER_THRESOLD_ID); thresholdField.addValidator(new ThresholdFieldValidator()); thresholdField.setValue(defaultRolloutGroupConditions.getSuccessConditionExp()); return thresholdField; }
@Override public void undo() { configurationEnabledChange = false; configurationCaRootAuthorityChanged = false; configurationEnabled = getTenantConfigurationManagement() .getConfigurationValue(getConfigurationKey(), Boolean.class).getValue(); caRootAuthorityTextField.setValue(getCaRootAuthorityValue()); }
private void buildUserField() { username = new TextField(i18n.getMessage("label.login.username")); username.setIcon(FontAwesome.USER); username.addStyleName( ValoTheme.TEXTFIELD_INLINE_ICON + " " + ValoTheme.TEXTFIELD_SMALL + " " + LOGIN_TEXTFIELD); username.setId("login-username"); if(isDemo && !uiProperties.getDemo().getUser().isEmpty()) { username.setValue(uiProperties.getDemo().getUser()); } }
protected void initNameField(GridLayout layout) { nameField = new TextField(); nameField.setWriteThrough(true); nameField.setImmediate(true); layout.addComponent(new Label(ExplorerApp.get().getI18nManager().getMessage(Messages.PROCESS_EDITOR_NAME))); layout.addComponent(nameField); if (workflowName != null) { nameField.setValue(workflowName); workflowName = null; } }
protected void initDescriptionField(GridLayout layout) { descriptionField = new TextField(); descriptionField.setRows(4); descriptionField.setColumns(35); descriptionField.addStyleName(ExplorerLayout.STYLE_TEXTAREA_NO_RESIZE); layout.addComponent(new Label(ExplorerApp.get().getI18nManager().getMessage(Messages.PROCESS_EDITOR_DESCRIPTION))); layout.addComponent(descriptionField); if (description != null) { descriptionField.setValue(description); description = null; } }
@Override public void pageChanged(PagedTableChangeEvent event) { first.setEnabled(container.getStartIndex() > 0); previous.setEnabled(container.getStartIndex() > 0); next.setEnabled(container.getStartIndex() < container .getRealSize() - getPageLength()); last.setEnabled(container.getStartIndex() < container .getRealSize() - getPageLength()); currentPageTextField.setValue(String.valueOf(getCurrentPage())); totalPagesLabel.setValue(getTotalAmountOfPages()); } });