com.vaadin.ui.TextArea.addValueChangeListener()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(146)

本文整理了Java中com.vaadin.ui.TextArea.addValueChangeListener()方法的一些代码示例,展示了TextArea.addValueChangeListener()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextArea.addValueChangeListener()方法的具体详情如下:
包路径:com.vaadin.ui.TextArea
类名称:TextArea
方法名:addValueChangeListener

TextArea.addValueChangeListener介绍

暂无

代码示例

代码示例来源:origin: com.vaadin/vaadin-server

/**
 * Constructs a new {@code TextArea} with a value change listener.
 * <p>
 * The listener is called when the value of this {@code TextArea} is changed
 * either by the user or programmatically.
 *
 * @param valueChangeListener
 *            the value change listener, not {@code null}
 * @since 8.0
 */
public TextArea(ValueChangeListener<String> valueChangeListener) {
  addValueChangeListener(valueChangeListener);
}

代码示例来源:origin: com.vaadin/vaadin-server

/**
 * Constructs a new {@code TextArea} with the given caption, initial text
 * contents and a value change listener.
 * <p>
 * The listener is called when the value of this {@code TextArea} is changed
 * either by the user or programmatically.
 *
 * @param caption
 *            the caption for the field
 * @param value
 *            the value for the field, not {@code null}
 * @param valueChangeListener
 *            the value change listener, not {@code null}
 * @since 8.0
 */
public TextArea(String caption, String value,
    ValueChangeListener<String> valueChangeListener) {
  this(caption, value);
  addValueChangeListener(valueChangeListener);
}

代码示例来源:origin: vaadin/material-theme-fw8

public Registration addValueChangeListener(HasValue.ValueChangeListener<String> listener) {
  return field.addValueChangeListener(listener);
}

代码示例来源:origin: vaadin/material-theme-fw8

public MDTextAreaBox(String label, boolean light) {
  String primaryStyleName = light ? Styles.TextFieldBoxes.LIGHT : Styles.TextFieldBoxes.DARK;
  setPrimaryStyleName(primaryStyleName);
  this.label.setValue(label);
  this.label.setPrimaryStyleName(primaryStyleName + "-label");
  this.label.addStyleName(RESTING);
  this.label.setWidthUndefined();
  this.icon.setPrimaryStyleName(primaryStyleName + "-icon");
  this.ripple.setPrimaryStyleName(primaryStyleName + "-ripple");
  this.field.setPrimaryStyleName(primaryStyleName + "-input");
  this.field.addFocusListener(event -> {
    addStyleName("focus");
    updateFloatingLabelPosition(this.field.getValue());
  });
  this.field.addBlurListener(event -> {
    removeStyleName("focus");
    updateFloatingLabelPosition(this.field.getValue());
  });
  this.field.addValueChangeListener(event -> updateFloatingLabelPosition(event.getValue()));
  this.helper.setPrimaryStyleName(primaryStyleName + "-helper");
  this.helper.setWidthUndefined();
  addComponents(this.label, icon, field, ripple, this.helper);
}

相关文章