com.vaadin.v7.ui.TextField.setConverter()方法的使用及代码示例

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

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

TextField.setConverter介绍

暂无

代码示例

代码示例来源:origin: OpenNMS/opennms

@Override
  public Field<?> createField(Container container, Object itemId, Object propertyId, Component uiContext) {
    if (propertyId.equals("decodes")) {
      final TextField field = new TextField();
      field.setConverter(new DecodeListConverter());
      return field;
    }
    return super.createField(container, itemId, propertyId, uiContext);
  }
});

代码示例来源:origin: OpenNMS/opennms

@Override
  public Field<?> createField(Container container, Object itemId, Object propertyId, Component uiContext) {
    if (propertyId.equals("vbvalues")) {
      final TextField field = new TextField();
      field.setConverter(new CsvListConverter());
      return field;
    }
    return super.createField(container, itemId, propertyId, uiContext);
  }
});

代码示例来源:origin: OpenNMS/opennms

field.setRequired(true);
field.setNullSettingAllowed(false);
field.setConverter(new StringToIntegerConverter());
return field;
field.setRequired(true);
field.setNullSettingAllowed(false);
field.setConverter(new StringToDoubleConverter());
return field;

代码示例来源:origin: OpenNMS/opennms

@Override
  public Field<?> createField(Container container, Object itemId, Object propertyId, Component uiContext) {
    if (propertyId.equals("mename")) {
      final ComboBox field = new ComboBox();
      field.setSizeFull();
      field.setRequired(true);
      field.setImmediate(true);
      field.setNullSelectionAllowed(false);
      field.setNewItemsAllowed(false);
      field.addItem(Maskelement.TAG_UEI);
      field.addItem(Maskelement.TAG_SOURCE);
      field.addItem(Maskelement.TAG_NODEID);
      field.addItem(Maskelement.TAG_HOST);
      field.addItem(Maskelement.TAG_INTERFACE);
      field.addItem(Maskelement.TAG_SNMPHOST);
      field.addItem(Maskelement.TAG_SERVICE);
      field.addItem(Maskelement.TAG_SNMP_EID);
      field.addItem(Maskelement.TAG_SNMP_SPECIFIC);
      field.addItem(Maskelement.TAG_SNMP_GENERIC);
      field.addItem(Maskelement.TAG_SNMP_COMMUNITY);
      return field;
    }
    if (propertyId.equals("mevalues")) {
      final TextField field = new TextField();
      field.setConverter(new CsvListConverter());
      return field;
    }
    return super.createField(container, itemId, propertyId, uiContext);
  }
});

代码示例来源:origin: OpenNMS/opennms

timeoutField.setRequiredError("Must be given");
timeoutField.setWidth(FIELD_WIDTH, Unit.PIXELS);
timeoutField.setConverter(new StringToLongConverter() {
  @Override
  public Long convertToModel(String value, Class<? extends Long> targetType, Locale locale) throws ConversionException {

代码示例来源:origin: OpenNMS/opennms

step.setValidationVisible(true);
step.setNullSettingAllowed(false);
step.setConverter(new StringToIntegerConverter());

代码示例来源:origin: tepi/FilteringTable

final TextField currentPageTextField = new TextField();
currentPageTextField.setValue(String.valueOf(getCurrentPage()));
currentPageTextField.setConverter(new StringToIntegerConverter() {
  @Override
  protected NumberFormat getFormat(Locale locale) {

相关文章