• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java TextChangeEventMode类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: buildUI

import com.vaadin.ui.AbstractTextField.TextChangeEventMode; //导入依赖的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


示例2: buildUI

import com.vaadin.ui.AbstractTextField.TextChangeEventMode; //导入依赖的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, event.getText());
            context.getConfigurationService().save(component.findSetting(Web.BODY_TEXT));
        }
    });

    addComponent(editor);
    setExpandRatio(editor, 1);
}
 
开发者ID:JumpMind,项目名称:metl,代码行数:20,代码来源:EditWebPanel.java


示例3: createSearchField

import com.vaadin.ui.AbstractTextField.TextChangeEventMode; //导入依赖的package包/类
private TextField createSearchField() {
    final TextField textField = new TextFieldBuilder().immediate(true).id(UIComponentIdProvider.CUSTOM_FILTER_QUERY)
            .maxLengthAllowed(SPUILabelDefinitions.TARGET_FILTER_QUERY_TEXT_FIELD_LENGTH).buildTextComponent();
    textField.addStyleName("target-filter-textfield");
    textField.setWidth(900.0F, Unit.PIXELS);
    textField.setTextChangeEventMode(TextChangeEventMode.EAGER);
    textField.setImmediate(true);
    textField.setTextChangeTimeout(100);
    return textField;
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:11,代码来源:AutoCompleteTextFieldComponent.java


示例4: createKeyTextField

import com.vaadin.ui.AbstractTextField.TextChangeEventMode; //导入依赖的package包/类
private TextField createKeyTextField() {
    final TextField keyField = new TextFieldBuilder().caption(i18n.getMessage("textfield.key")).required(true)
            .prompt(i18n.getMessage("textfield.key")).immediate(true)
            .id(UIComponentIdProvider.METADATA_KEY_FIELD_ID).maxLengthAllowed(MetaData.KEY_MAX_SIZE)
            .buildTextComponent();
    keyField.addTextChangeListener(this::onKeyChange);
    keyField.setTextChangeEventMode(TextChangeEventMode.EAGER);
    keyField.setWidth("100%");
    return keyField;
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:11,代码来源:AbstractMetadataPopupLayout.java


示例5: createValueTextField

import com.vaadin.ui.AbstractTextField.TextChangeEventMode; //导入依赖的package包/类
private TextArea createValueTextField() {
    valueTextArea = new TextAreaBuilder().caption(i18n.getMessage("textfield.value")).required(true)
            .prompt(i18n.getMessage("textfield.value")).immediate(true).id(UIComponentIdProvider.METADATA_VALUE_ID)
            .maxLengthAllowed(MetaData.VALUE_MAX_SIZE).buildTextComponent();
    valueTextArea.setNullRepresentation("");
    valueTextArea.setSizeFull();
    valueTextArea.setHeight(100, Unit.PERCENTAGE);
    valueTextArea.addTextChangeListener(this::onValueChange);
    valueTextArea.setTextChangeEventMode(TextChangeEventMode.EAGER);
    return valueTextArea;
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:12,代码来源:AbstractMetadataPopupLayout.java


示例6: createSearchField

import com.vaadin.ui.AbstractTextField.TextChangeEventMode; //导入依赖的package包/类
/**
 * Create a search text field.
 * 
 * @param textChangeListener
 *            listener when text is changed.
 * @return the textfield
 */
public TextField createSearchField(final TextChangeListener textChangeListener) {
    final TextField textField = style("filter-box").styleName("text-style filter-box-hide").buildTextComponent();
    textField.setWidth(100.0F, Unit.PERCENTAGE);
    textField.addTextChangeListener(textChangeListener);
    textField.setTextChangeEventMode(TextChangeEventMode.LAZY);
    // 1 seconds timeout.
    textField.setTextChangeTimeout(1000);
    return textField;
}
 
开发者ID:eclipse,项目名称:hawkbit,代码行数:17,代码来源:TextFieldBuilder.java


示例7: addFilter

import com.vaadin.ui.AbstractTextField.TextChangeEventMode; //导入依赖的package包/类
public TextField addFilter() {
    TextField textField = new TextField();
    textField.setColumns(15);
    textField.addStyleName(ValoTheme.TEXTFIELD_INLINE_ICON);
    textField.setInputPrompt("Filter");
    textField.setIcon(FontAwesome.SEARCH);
    textField.setTextChangeEventMode(TextChangeEventMode.LAZY);
    textField.setTextChangeTimeout(500);
    textField.setNullRepresentation("");
    wrapper.addComponent(textField);
    wrapper.setComponentAlignment(textField, Alignment.BOTTOM_RIGHT);
    return textField;
}
 
开发者ID:JumpMind,项目名称:metl,代码行数:14,代码来源:ButtonBar.java


示例8: textChangeEventMode

import com.vaadin.ui.AbstractTextField.TextChangeEventMode; //导入依赖的package包/类
@Override
public NumberInputBuilder<T> textChangeEventMode(TextChangeEventMode inputEventMode) {
	getInstance().setTextChangeEventMode(inputEventMode);
	return builder();
}
 
开发者ID:holon-platform,项目名称:holon-vaadin7,代码行数:6,代码来源:NumberField.java


示例9: textChangeEventMode

import com.vaadin.ui.AbstractTextField.TextChangeEventMode; //导入依赖的package包/类
@Override
public StringInputBuilder textChangeEventMode(TextChangeEventMode inputEventMode) {
	getInstance().setTextChangeEventMode(inputEventMode);
	return builder();
}
 
开发者ID:holon-platform,项目名称:holon-vaadin7,代码行数:6,代码来源:AbstractStringFieldBuilder.java


示例10: buildUI

import com.vaadin.ui.AbstractTextField.TextChangeEventMode; //导入依赖的package包/类
protected void buildUI() {
    ButtonBar buttonBar = new ButtonBar();
    if (!readOnly) {
        addComponent(buttonBar);
        Button autoMapButton = buttonBar.addButton("Auto Map", FontAwesome.FLASH);
        removeButton = buttonBar.addButton("Remove", FontAwesome.TRASH_O);
        removeButton.setEnabled(false);
        autoMapButton.addClickListener(new AutoMapListener());
        removeButton.addClickListener(new RemoveListener());
    }
    buttonBar.addButtonRight("Export", FontAwesome.DOWNLOAD, (e)->export());

    HorizontalLayout titleHeader = new HorizontalLayout();
    titleHeader.setSpacing(true);
    titleHeader.setMargin(new MarginInfo(false, true, false, true));
    titleHeader.setWidth(100f, Unit.PERCENTAGE);
    titleHeader.addComponent(
            new Label("<b>Input Model:</b> &nbsp;" + (component.getInputModel() != null ? component.getInputModel().getName() : "?"),
                    ContentMode.HTML));
    titleHeader.addComponent(
            new Label("<b>Output Model:</b> &nbsp;" + (component.getOutputModel() != null ? component.getOutputModel().getName() : "?"),
                    ContentMode.HTML));
    addComponent(titleHeader);

    HorizontalLayout filterHeader = new HorizontalLayout();
    filterHeader.setSpacing(true);
    filterHeader.setMargin(new MarginInfo(true, true, true, true));
    filterHeader.setWidth(100f, Unit.PERCENTAGE);
    HorizontalLayout srcFilterHeader = new HorizontalLayout();
    srcFilterHeader.setSpacing(true);
    srcFilterHeader.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT);
    filterHeader.addComponent(srcFilterHeader);
    HorizontalLayout dstFilterHeader = new HorizontalLayout();
    dstFilterHeader.setSpacing(true);
    dstFilterHeader.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT);
    filterHeader.addComponent(dstFilterHeader);
    addComponent(filterHeader);

    srcTextFilter = new TextField();
    srcTextFilter.setWidth(20, Unit.EM);
    srcTextFilter.setInputPrompt("Filter");
    srcTextFilter.addStyleName(ValoTheme.TEXTFIELD_INLINE_ICON);
    srcTextFilter.setIcon(FontAwesome.SEARCH);
    srcTextFilter.setImmediate(true);
    srcTextFilter.setTextChangeEventMode(TextChangeEventMode.LAZY);
    srcTextFilter.setTextChangeTimeout(200);
    srcTextFilter.addTextChangeListener(new FilterInputTextListener());
    srcFilterHeader.addComponent(srcTextFilter);

    srcMapFilter = new CheckBox("Mapped Only");
    srcMapFilter.addValueChangeListener(new FilterSrcMapListener());
    srcFilterHeader.addComponent(srcMapFilter);

    dstTextFilter = new TextField();
    dstTextFilter.setWidth(20, Unit.EM);
    dstTextFilter.setInputPrompt("Filter");
    dstTextFilter.addStyleName(ValoTheme.TEXTFIELD_INLINE_ICON);
    dstTextFilter.setIcon(FontAwesome.SEARCH);
    dstTextFilter.setImmediate(true);
    dstTextFilter.setTextChangeEventMode(TextChangeEventMode.LAZY);
    dstTextFilter.setTextChangeTimeout(200);
    dstTextFilter.addTextChangeListener(new FilterOutputTextListener());
    dstFilterHeader.addComponent(dstTextFilter);

    dstMapFilter = new CheckBox("Mapped Only");
    dstMapFilter.addValueChangeListener(new FilterDstMapListener());
    dstFilterHeader.addComponent(dstMapFilter);

    Panel panel = new Panel();
    VerticalLayout vlay = new VerticalLayout();
    vlay.setSizeFull();
    diagram = new MappingDiagram(context, component, readOnly);
    diagram.setSizeFull();
    vlay.addComponent(diagram);
    panel.setContent(vlay);
    panel.setSizeFull();
    addComponent(panel);
    setExpandRatio(panel, 1.0f);
    diagram.addListener(new EventListener());
}
 
开发者ID:JumpMind,项目名称:metl,代码行数:81,代码来源:EditMappingPanel.java


示例11: EditFlowPalette

import com.vaadin.ui.AbstractTextField.TextChangeEventMode; //导入依赖的package包/类
public EditFlowPalette(EditFlowPanel designFlowLayout, ApplicationContext context, String projectVersionId) {
    this.context = context;
    this.designFlowLayout = designFlowLayout;
    this.projectVersionId = projectVersionId;

    final int WIDTH = 150;
    
    setHeight(100, Unit.PERCENTAGE);
    setWidth(WIDTH, Unit.PIXELS);

    HorizontalLayout topWrapper = new HorizontalLayout();
    topWrapper.setMargin(new MarginInfo(true, false, false, false));
    HorizontalLayout top = new HorizontalLayout();
    top.addStyleName(ButtonBar.STYLE);
    top.setMargin(true);
    topWrapper.addComponent(top);
    
    addComponent(topWrapper);
    
    TextField filterField = new TextField();
    filterField.setWidth(WIDTH-30, Unit.PIXELS);
    filterField.setInputPrompt("Filter");
    filterField.addStyleName(ValoTheme.TEXTFIELD_INLINE_ICON);
    filterField.setIcon(FontAwesome.SEARCH);
    filterField.setImmediate(true);
    filterField.setTextChangeEventMode(TextChangeEventMode.LAZY);
    filterField.setTextChangeTimeout(200);
    filterField.addTextChangeListener((event) -> {
        filterText = event.getText().toLowerCase();
        populateComponentPalette();
    });
    top.addComponent(filterField);

    Panel panel = new Panel();
    panel.setSizeFull();
    panel.addStyleName(ValoTheme.PANEL_BORDERLESS);
    panel.addStyleName(ValoTheme.PANEL_SCROLL_INDICATOR);

    componentLayout = new VerticalLayout();
    componentLayout.setMargin(new MarginInfo(true, false, false, false));
    componentLayout.addStyleName("scrollable");
    panel.setContent(componentLayout);

    addComponent(panel);
    setExpandRatio(panel, 1);

    populateComponentPalette();

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


示例12: buildSearchBar

import com.vaadin.ui.AbstractTextField.TextChangeEventMode; //导入依赖的package包/类
protected AbstractLayout buildSearchBar()
{
	final VerticalLayout layout = new VerticalLayout();
	layout.setWidth(100, Unit.PERCENTAGE);
	searchField.setWidth(100, Unit.PERCENTAGE);
	searchBar = layout;

	basicSearchLayout = new HorizontalLayout();
	basicSearchLayout.setWidth(100, Unit.PERCENTAGE);
	layout.addComponent(basicSearchLayout);

	final AbstractLayout advancedSearch = buildAdvancedSearch();
	if (advancedSearch != null)
	{
		basicSearchLayout.addComponent(advancedSearchButton);
	}

	searchField.setInputPrompt("Search");
	searchField.setId("searchField");
	searchField.setTextChangeEventMode(TextChangeEventMode.LAZY);
	searchField.setImmediate(true);
	searchField.addTextChangeListener(new TextChangeListener()
	{
		private static final long serialVersionUID = 1L;

		@Override
		public void textChange(final TextChangeEvent event)
		{
			filterString = event.getText().trim();
			triggerFilter(filterString);
		}

	});

	// clear button
	final Button clear = createClearButton();

	basicSearchLayout.addComponent(clear);
	basicSearchLayout.setComponentAlignment(clear, Alignment.MIDDLE_LEFT);
	basicSearchLayout.addComponent(searchField);
	basicSearchLayout.setExpandRatio(searchField, 1.0f);

	searchField.focus();

	return layout;
}
 
开发者ID:rlsutton1,项目名称:VaadinUtils,代码行数:47,代码来源:SearchableGrid.java


示例13: buildSearchBar

import com.vaadin.ui.AbstractTextField.TextChangeEventMode; //导入依赖的package包/类
protected AbstractLayout buildSearchBar()
{
	VerticalLayout layout = new VerticalLayout();
	layout.setWidth(100, Unit.PERCENTAGE);
	searchField.setWidth(100, Unit.PERCENTAGE);
	searchBar = layout;

	HorizontalLayout basicSearchLayout = new HorizontalLayout();
	basicSearchLayout.setWidth(100, Unit.PERCENTAGE);
	layout.addComponent(basicSearchLayout);

	AbstractLayout advancedSearch = buildAdvancedSearch();
	if (advancedSearch != null)
	{
		basicSearchLayout.addComponent(advancedSearchCheckbox);
	}

	searchField.setInputPrompt("Search");
	searchField.setId("searchField");
	searchField.setTextChangeEventMode(TextChangeEventMode.LAZY);
	searchField.setImmediate(true);
	searchField.addTextChangeListener(new TextChangeListener()
	{
		private static final long serialVersionUID = 1L;

		@Override
		public void textChange(final TextChangeEvent event)
		{
			filterString = event.getText().trim();
			triggerFilter(filterString);
		}

	});

	// clear button
	Button clear = createClearButton();
	basicSearchLayout.addComponent(clear);
	basicSearchLayout.setComponentAlignment(clear, Alignment.MIDDLE_CENTER);

	basicSearchLayout.addComponent(searchField);
	basicSearchLayout.setExpandRatio(searchField, 1.0f);

	searchField.focus();

	return layout;
}
 
开发者ID:rlsutton1,项目名称:VaadinUtils,代码行数:47,代码来源:SearchableSelectableEntityTable.java


示例14: init

import com.vaadin.ui.AbstractTextField.TextChangeEventMode; //导入依赖的package包/类
@Override
protected void init(VaadinRequest request) {

    VerticalLayout center = new VerticalLayout();
    setContent(center);
    center.setSizeFull();

    VerticalLayout layout = new VerticalLayout();
    layout.setMargin(true);
    layout.setSizeUndefined();
    center.addComponent(layout);
    center.setComponentAlignment(layout, Alignment.MIDDLE_CENTER);

    EywaProperty<String> p = new EywaProperty<String>("shared-textfield",
            String.class);
    if (p.getValue() == null) {
        p.setValue("Share text area");
    }
    final TextArea ta = new TextArea(p);
    ta.setWidth("300px");
    ta.setHeight("200px");
    layout.addComponent(ta);
    ta.setTextChangeEventMode(TextChangeEventMode.EAGER);
    ta.addTextChangeListener(new TextChangeListener() {
        public void textChange(TextChangeEvent event) {
            ta.setValue(event.getText());
        }
    });

    final Slider slider = new Slider(0.0, 100.0, 1);
    slider.setPropertyDataSource(new EywaProperty<Double>("shared-slider",
            Double.class));
    layout.addComponent(slider);
    slider.setImmediate(true);
    layout.addComponent(slider);
    slider.setWidth("300px");

    layout.addComponent(new Link("Open this in new window",
            new ExternalResource(getPage().getLocation().toString()), ""
                    + System.currentTimeMillis(), 400, 300,
            BorderStyle.MINIMAL));
}
 
开发者ID:jojule,项目名称:eywa,代码行数:43,代码来源:DemoUI.java


示例15: setTextChangeEventMode

import com.vaadin.ui.AbstractTextField.TextChangeEventMode; //导入依赖的package包/类
/**
 * Sets the mode how the TextField triggers {@link TextChangeEvent}s.
 * @param inputEventMode the new mode
 * @see TextChangeEventMode
 */
public void setTextChangeEventMode(TextChangeEventMode inputEventMode) {
	getInternalField().setTextChangeEventMode(inputEventMode);
}
 
开发者ID:holon-platform,项目名称:holon-vaadin7,代码行数:9,代码来源:NumberField.java


示例16: getTextChangeEventMode

import com.vaadin.ui.AbstractTextField.TextChangeEventMode; //导入依赖的package包/类
/**
 * Gets the current {@link TextChangeEventMode}
 * @return the mode used to trigger {@link TextChangeEvent}s.
 */
public TextChangeEventMode getTextChangeEventMode() {
	return getInternalField().getTextChangeEventMode();
}
 
开发者ID:holon-platform,项目名称:holon-vaadin7,代码行数:8,代码来源:NumberField.java


示例17: textChangeEventMode

import com.vaadin.ui.AbstractTextField.TextChangeEventMode; //导入依赖的package包/类
/**
 * Sets the mode how the TextField triggers {@link TextChangeEvent}s.
 * @param inputEventMode the new mode
 * @see TextChangeEventMode
 * @return this
 */
B textChangeEventMode(TextChangeEventMode inputEventMode);
 
开发者ID:holon-platform,项目名称:holon-vaadin7,代码行数:8,代码来源:TextInputBuilder.java



注:本文中的com.vaadin.ui.AbstractTextField.TextChangeEventMode类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Step类代码示例发布时间:2022-05-22
下一篇:
Java WstxInputProperties类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap