• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java TextChangeEvent类的典型用法和代码示例

未分类 4次浏览

本文整理汇总了Java中com.vaadin.event.FieldEvents.TextChangeEvent的典型用法代码示例。如果您正苦于以下问题:Java TextChangeEvent类的具体用法?Java TextChangeEvent怎么用?Java TextChangeEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

TextChangeEvent类属于com.vaadin.event.FieldEvents包,在下文中一共展示了TextChangeEvent类的33个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getManufacturingFilterListener

点赞 3

import com.vaadin.event.FieldEvents.TextChangeEvent; //导入依赖的package包/类
/**
 * Returns the TextChangeListener that gets triggered
 * 
 * @return
 */
private TextChangeListener getManufacturingFilterListener() {
	return new TextChangeListener() {

		/**
		 * 
		 */
		private static final long serialVersionUID = -2368474286053602744L;

		@Override
		public void textChange(TextChangeEvent event) {
			String newValue = (String) event.getText();
			@SuppressWarnings("unchecked")
			BeanItemContainer<VehicleInfo> container = ((BeanItemContainer<VehicleInfo>) grid
					.getContainerDataSource());
			// This is important, this removes the previous filter that was
			// used to filter the container
			container.removeContainerFilters(MANUFACTURER);
			if (null != newValue && !newValue.isEmpty()) {
				container.addContainerFilter(new SimpleStringFilter(
						MANUFACTURER, newValue, true, false));
			}
			grid.recalculateColumnWidths();
		}
	};
}
 

开发者ID:KrishnaPhani,
项目名称:KrishnasSpace,
代码行数:31,
代码来源:FilterGrid.java

示例2: initializeText

点赞 3

import com.vaadin.event.FieldEvents.TextChangeEvent; //导入依赖的package包/类
protected void initializeText() {
	this.textAreaComments.setImmediate(true);
	this.textAreaComments.addTextChangeListener(new TextChangeListener() {
		private static final long serialVersionUID = 1L;

		@Override
		public void textChange(TextChangeEvent event) {
			if (event.getText().isEmpty()) {
				self.buttonPush.setEnabled(false);
			} else {
				if (self.container.getConflictCount() == 0) {
					self.buttonPush.setEnabled(true);
				} else {
					self.buttonPush.setEnabled(false);
				}
			}
		}			
	});
}
 

开发者ID:apache,
项目名称:incubator-openaz,
代码行数:20,
代码来源:GitPushWindow.java

示例3: initializeText

点赞 3

import com.vaadin.event.FieldEvents.TextChangeEvent; //导入依赖的package包/类
protected void initializeText() {
	//
	// Add a validator
	//
	this.textFieldColumn.addValidator(new IntegerRangeValidator("Please enter an integer greater than or equal to 0.", 0, null));
	//
	// Respond to text changing to setup the button
	//
	this.textFieldColumn.addTextChangeListener(new TextChangeListener() {
		private static final long serialVersionUID = 1L;

		@Override
		public void textChange(TextChangeEvent event) {
			if (event.getText() != null && event.getText().isEmpty() == false) {
				self.buttonSave.setEnabled(true);
			} else {
				self.buttonSave.setEnabled(false);
			}
		}
	});
}
 

开发者ID:apache,
项目名称:incubator-openaz,
代码行数:22,
代码来源:ColumnSelectionWindow.java

示例4: onFileNameChange

点赞 3

import com.vaadin.event.FieldEvents.TextChangeEvent; //导入依赖的package包/类
private void onFileNameChange(final TextChangeEvent event, final Label warningIconLabel, final Item newItem) {

        final String itemId = (String) ((TextField) event.getComponent()).getData();
        final String fileName = event.getText();

        final Boolean isWarningIconDisplayed = isWarningIcon(warningIconLabel);
        setWarningIcon(warningIconLabel, fileName, itemId);

        final Long currentSwId = (Long) newItem.getItemProperty(BASE_SOFTWARE_ID).getValue();
        final String oldFileName = (String) newItem.getItemProperty(FILE_NAME).getValue();
        newItem.getItemProperty(FILE_NAME).setValue(event.getText());

        // if warning was displayed prior and not displayed currently
        if (isWarningIconDisplayed && !warningIconLabel.isVisible()) {
            modifyIconOfSameSwId(itemId, currentSwId, oldFileName);
        }
        checkDuplicateEntry(itemId, currentSwId, event.getText(), oldFileName);
        enableOrDisableUploadBtn();
    }
 

开发者ID:eclipse,
项目名称:hawkbit,
代码行数:20,
代码来源:UploadConfirmationWindow.java

示例5: initSearchField

点赞 3

import com.vaadin.event.FieldEvents.TextChangeEvent; //导入依赖的package包/类
protected void initSearchField() {
  HorizontalLayout searchLayout = new HorizontalLayout();
  searchLayout.setSpacing(true);
  addComponent(searchLayout);
  
  // textfield
  searchField = new TextField();
  searchField.setInputPrompt(i18nManager.getMessage(Messages.PEOPLE_SEARCH));
  searchField.setWidth(180, UNITS_PIXELS);
  searchField.focus();
  searchLayout.addComponent(searchField);
  
  // Logic to change table according to input
  searchField.addListener(new TextChangeListener() {
    public void textChange(TextChangeEvent event) {
      searchPeople(event.getText());
    }
  });
  
  initSelectMyselfButton(searchLayout);
}
 

开发者ID:logicalhacking,
项目名称:SecureBPMN,
代码行数:22,
代码来源:SelectUsersPopupWindow.java

示例6: buildUI

点赞 3

import com.vaadin.event.FieldEvents.TextChangeEvent; //导入依赖的package包/类
protected void buildUI() {
    ButtonBar buttonBar = new ButtonBar();
    addComponent(buttonBar);

    editor = CommonUiUtils.createAceEditor();
    editor.setTextChangeEventMode(TextChangeEventMode.LAZY);
    editor.setTextChangeTimeout(200);
    editor.setMode(AceMode.text);
    editor.setValue(component.get(TextConstant.SETTING_TEXT));
    editor.addTextChangeListener(new TextChangeListener() {
        public void textChange(TextChangeEvent event) {
            Setting data = component.findSetting(TextConstant.SETTING_TEXT);
            data.setValue(event.getText());
            context.getConfigurationService().save(data);
        }
    });

    addComponent(editor);
    setExpandRatio(editor, 1);
}
 

开发者ID:JumpMind,
项目名称:metl,
代码行数:21,
代码来源:EditTextConstant.java

示例7: buildUI

点赞 3

import com.vaadin.event.FieldEvents.TextChangeEvent; //导入依赖的package包/类
protected void buildUI() {
ButtonBar buttonBar = new ButtonBar();
addComponent(buttonBar);

editor = CommonUiUtils.createAceEditor();
editor.setTextChangeEventMode(TextChangeEventMode.LAZY);
editor.setTextChangeTimeout(200);
editor.setMode(AceMode.xml);
editor.setValue(component.get(Web.BODY_TEXT));
editor.addTextChangeListener(new TextChangeListener() {
public void textChange(TextChangeEvent event) {
component.put(Web.BODY_TEXT%2


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)