本文整理了Java中com.vaadin.v7.ui.TextField.setWidth()
方法的一些代码示例,展示了TextField.setWidth()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TextField.setWidth()
方法的具体详情如下:
包路径:com.vaadin.v7.ui.TextField
类名称:TextField
方法名:setWidth
暂无
代码示例来源:origin: info.magnolia.activation/magnolia-module-activation
private Field<String> createKeyLengthTextField() {
String caption = i18n.translate("key.length");
final TextField field = new TextField(caption);
field.setDescription(caption);
field.setMaxLength(4);
field.setRequired(true);
field.addStyleName("required");
field.setWidth(100, Unit.PERCENTAGE);
// force plain input
field.setColumns(0);
return field;
}
代码示例来源:origin: OpenNMS/opennms
/**
* Instantiates a new resource type form.
*/
public ResourceTypeForm() {
setCaption("Resource Type Detail");
resourceTypeLayout.setMargin(true);
name.setRequired(true);
name.setWidth("100%");
resourceTypeLayout.addComponent(name);
label.setRequired(true);
label.setWidth("100%");
resourceTypeLayout.addComponent(label);
resourceLabel.setRequired(false);
resourceLabel.setWidth("100%");
resourceTypeLayout.addComponent(resourceLabel);
resourceTypeLayout.addComponent(storageStrategy);
resourceTypeLayout.addComponent(persistenceSelectorStrategy);
setResourceType(createBasicResourceType());
resourceTypeEditor.bind(name, "name");
resourceTypeEditor.bind(label, "label");
resourceTypeEditor.bind(resourceLabel, "resourceLabel");
resourceTypeEditor.bind(storageStrategy, "storageStrategy");
resourceTypeEditor.bind(persistenceSelectorStrategy, "persistenceSelectorStrategy");
setCompositionRoot(resourceTypeLayout);
}
代码示例来源:origin: OpenNMS/opennms
/**
* Instantiates a new system definition choice field.
*
* @param caption the caption
*/
public SystemDefChoiceField(String caption) {
setCaption(caption);
oidType.setNullSelectionAllowed(false);
oidType.select("Single");
oidValue.setWidth("100%");
oidValue.setNullSettingAllowed(false);
oidValue.setRequired(true);
oidValue.setImmediate(true);
oidValue.addValidator(new RegexpValidator("^\\.[.\\d]+$", "Invalid OID {0}"));
}
代码示例来源:origin: OpenNMS/opennms
private void initFields() {
nonEditableField = new TextField();
nonEditableField.setWidth(400, Unit.PIXELS);
nonEditableField.setReadOnly(true);
nonEditableField.setEnabled(false);
editableField.setWidth(400, Unit.PIXELS);
editableField.setRequired(true);
editableField.setRequiredError("You must provide a value.");
代码示例来源:origin: OpenNMS/opennms
/**
* Instantiates a new system definition form.
*
* @param groupNames the group names
*/
public SystemDefForm(final List<String> groupNames) {
setCaption("System Definition Detail");
systemDefLayout.setMargin(true);
name.setRequired(true);
name.setWidth("100%");
systemDefLayout.addComponent(name);
systemDefChoice.setRequired(true);
systemDefLayout.addComponent(systemDefChoice);
collect = new CollectField("MIB Groups", groupNames);
collect.setRequired(true);
systemDefLayout.addComponent(collect);
setSystemDef(createBasicSystemDef());
systemDefEditor.bind(name, "name");
systemDefEditor.bind(systemDefChoice, "systemDefChoice");
systemDefEditor.bind(collect, "collect");
setCompositionRoot(systemDefLayout);
}
代码示例来源:origin: OpenNMS/opennms
eventUei.setWidth("100%");
eventLayout.addComponent(eventUei);
eventLabel.setWidth("100%");
eventLayout.addComponent(eventLabel);
eventLayout.addComponent(alarmDataAutoClean);
alarmDataReductionKey.setWidth("100%");
alarmDataReductionKey.setNullRepresentation("");
alarmDataReductionKey.setVisible(false);
alarmDataClearKey.setWidth("100%");
alarmDataClearKey.setNullRepresentation("");
alarmDataClearKey.setVisible(false);
代码示例来源:origin: OpenNMS/opennms
numberOfRequestsField.setRequiredError("Must be given");
numberOfRequestsField.setNullRepresentation("");
numberOfRequestsField.setWidth(FIELD_WIDTH, Unit.PIXELS);
numberOfRequestsField.addValidator((Validator) value -> {
if (value != null) {
timeoutField.setRequired(true);
timeoutField.setRequiredError("Must be given");
timeoutField.setWidth(FIELD_WIDTH, Unit.PIXELS);
timeoutField.setConverter(new StringToLongConverter() {
@Override
代码示例来源:origin: OpenNMS/opennms
m_reductionKeyComponent.setWidth(100.0f, Unit.PERCENTAGE);
m_reductionKeyComponent.setVisible(false);
m_reductionKeyComponent.setImmediate(true);
m_friendlyNameField.setWidth(100.0f, Unit.PERCENTAGE);
m_friendlyNameField.setVisible(false);
m_friendlyNameField.setImmediate(true);
m_weightField.setId("weightField");
m_weightField.setRequired(true);
m_weightField.setWidth(100.0f, Unit.PERCENTAGE);
m_weightField.addValidator(value -> {
try {
代码示例来源:origin: OpenNMS/opennms
/**
* Instantiates a new SNMP collection form.
*
* @param dataCollectionConfigDao the data collection configuration DAO
*/
public SnmpCollectionForm(final DataCollectionConfigDao dataCollectionConfigDao) {
setCaption("SNMP Collection Detail");
snmpCollectionLayout.setMargin(true);
name.setRequired(true);
name.setWidth("100%");
snmpCollectionLayout.addComponent(name);
snmpStorageFlag.setRequired(true);
snmpStorageFlag.addItem("select");
snmpStorageFlag.addItem("all");
snmpCollectionLayout.addComponent(snmpStorageFlag);
rrd.setRequired(true);
rrd.setWidth("100%");
snmpCollectionLayout.addComponent(rrd);
includeCollections = new IncludeCollectionField(dataCollectionConfigDao);
snmpCollectionLayout.addComponent(includeCollections);
setSnmpCollection(createBasicSnmpCollection());
snmpCollectionEditor.bind(name, "name");
snmpCollectionEditor.bind(snmpStorageFlag, "snmpStorageFlag");
snmpCollectionEditor.bind(rrd, "rrd");
snmpCollectionEditor.bind(includeCollections, "includeCollections");
setCompositionRoot(snmpCollectionLayout);
}
代码示例来源:origin: OpenNMS/opennms
timeRangeFrom.setDescription("Start of time range to be displayed");
timeRangeFrom.setImmediate(true);
timeRangeFrom.setWidth("60%");
timeRangeFrom.setTextChangeEventMode(AbstractTextField.TextChangeEventMode.EAGER);
timeRangeTo.setDescription("End of time range to be displayed");
timeRangeTo.setImmediate(true);
timeRangeTo.setWidth("60%");
timeRangeTo.setTextChangeEventMode(AbstractTextField.TextChangeEventMode.EAGER);
代码示例来源:origin: OpenNMS/opennms
fileName.setWidth("100%");
fileName.setRequired(true);
fileName.setRequiredError("This field cannot be null.");
代码示例来源:origin: OpenNMS/opennms
name.setWidth("100%");
groupLayout.addComponent(name);
代码示例来源:origin: OpenNMS/opennms
ueiBase.setWidth("100%");
ueiBase.setRequired(true);
ueiBase.setValue(defaultUei);
代码示例来源:origin: OpenNMS/opennms
serviceNameField.setWidth(400, Unit.PIXELS);
serviceNameField.setCaption("Service name");
serviceNameField.setNullRepresentation("");
connectionTextField.setWidth(400, Unit.PIXELS);
connectionTextField.setCaption("Connection");
connectionTextField.setRequired(true);
代码示例来源:origin: OpenNMS/opennms
m_nameTextField.setNullSettingAllowed(true);
m_nameTextField.setValue(businessService.getName());
m_nameTextField.setWidth(100, Unit.PERCENTAGE);
m_nameTextField.setRequired(true);
m_nameTextField.focus();
m_thresholdTextField.setEnabled(false);
m_thresholdTextField.setImmediate(true);
m_thresholdTextField.setWidth(100.0f, Unit.PERCENTAGE);
m_thresholdTextField.setValue("0.0");
m_thresholdTextField.addValidator(v -> {
m_exponentialPropagationBaseTextField.setEnabled(false);
m_exponentialPropagationBaseTextField.setImmediate(true);
m_exponentialPropagationBaseTextField.setWidth(100.0f, Unit.PERCENTAGE);
m_exponentialPropagationBaseTextField.setValue("2.0");
m_exponentialPropagationBaseTextField.addValidator(v -> {
代码示例来源:origin: OpenNMS/opennms
labelField.setCaption("Label");
labelField.setDescription("Label of this category");
labelField.setWidth(100, Unit.PERCENTAGE);
代码示例来源:origin: OpenNMS/opennms
titleField.setCaption("Title");
titleField.setDescription("Title of this surveillance view");
titleField.setWidth(25, Unit.PERCENTAGE);
内容来源于网络,如有侵权,请联系作者删除!