当前位置: 首页>>代码示例>>Java>>正文


Java FieldEvents类代码示例

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


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

示例1: createZkOptionGroup

import com.vaadin.event.FieldEvents; //导入依赖的package包/类
/**
 * zk
 * @return
 */
private OptionGroup createZkOptionGroup(){
    zkOption = new OptionGroup();
    zkOption.addItem(0);
    zkOption.setItemCaption(0, "消费者");
    zkOption.addItem(1);
    zkOption.setItemCaption(1, "提供者");
    zkOption.setStyleName(ValoTheme.OPTIONGROUP_HORIZONTAL);
    zkOption.select(0);
    zkOption.setNullSelectionAllowed(false);
    zkOption.addBlurListener((FieldEvents.BlurListener) blurEvent -> {
        String selected = blurEvent.getSource().toString();
        if ("0".equals(selected)) {
            isSelectedConsumer = true;
            reloadConsumerViewBox();
        } else if ("1".equals(selected)) {
            isSelectedConsumer = false;
            reloadProviderViewBox();
        }
    });
    return zkOption;
}
 
开发者ID:xburning,项目名称:dubbo-switch,代码行数:26,代码来源:ZookeeperAppViewUI.java

示例2: focus

import com.vaadin.event.FieldEvents; //导入依赖的package包/类
@Override
public void focus(FieldEvents.FocusEvent event) {
    if (FormGroupDefaults.BOOTSTRAP_MODE.equals(formGroup.getMode())) {
        // mode is already updated, don't change it again.
        return;
    }

    // field is focused, update the mode
    formGroup.removeMode();

    // field is focused, remove feedback if you are allowed to do it.
    if (this.removeFeedback) {
        formGroup.removeFeedback();
    }
}
 
开发者ID:knoobie,项目名称:bootstrap-formgroup,代码行数:16,代码来源:OnFocusRemoveModeListener.java

示例3: addTextChangeListener

import com.vaadin.event.FieldEvents; //导入依赖的package包/类
@Override
public void addTextChangeListener(TextChangeListener listener) {
    getEventRouter().addListener(TextChangeListener.class, listener);

    if (textChangeListener == null) {
        textChangeListener = (FieldEvents.TextChangeListener) e -> {
            TextChangeEvent event = new TextChangeEvent(this, e.getText(), e.getCursorPosition());

            getEventRouter().fireEvent(TextChangeListener.class, TextChangeListener::textChange, event);
        };
        component.addTextChangeListener(textChangeListener);
    }
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:14,代码来源:WebResizableTextArea.java

示例4: blur

import com.vaadin.event.FieldEvents; //导入依赖的package包/类
@Override
public void blur(FieldEvents.BlurEvent event) {
    SettingKey key = SettingKey.getEnumByKey(event.getComponent().getId());
    for(AbstractTextField field : fields) {
        if(field.getId().equals(key.getKey())) {
            presenter.updateSetting(key, field.getValue());
            break;
        }
    }
}
 
开发者ID:felixhusse,项目名称:bookery,代码行数:11,代码来源:ServerSettingsLayout.java

示例5: UsersMenu

import com.vaadin.event.FieldEvents; //导入依赖的package包/类
public UsersMenu() {
    textSearch.addStyleName(ValoTheme.TEXTFIELD_SMALL);
    textSearch.setWidth(100, Unit.PERCENTAGE);
    textSearch.setNullRepresentation("");
    textSearch.setWidth(100, Unit.PERCENTAGE);
    textSearch.setInputPrompt("type to search users");
    textSearch.addTextChangeListener(new FieldEvents.TextChangeListener() {

        @Override
        public void textChange(FieldEvents.TextChangeEvent event) {
            search(event.getText());
        }
    });

    table.addStyleName(ValoTheme.TABLE_BORDERLESS);
    table.addStyleName(ValoTheme.TABLE_NO_HEADER);
    table.addStyleName(ValoTheme.TABLE_NO_VERTICAL_LINES);
    table.addStyleName(ValoTheme.TABLE_SMALL);
    table.addStyleName(ValoTheme.TABLE_COMPACT);
    table.addStyleName(ValoTheme.TABLE_NO_STRIPES);
    table.addContainerProperty("user", User.class, null, "Username", null, Table.Align.LEFT);
    table.addContainerProperty("tasks", Label.class, null, "Tasks", null, Table.Align.LEFT);
    table.setColumnExpandRatio("user", 1f);
    table.setVisibleColumns("user", "tasks");
    table.setSizeFull();
    table.setColumnExpandRatio("user", 1f);
    table.setSelectable(false);
    table.addGeneratedColumn("user", new UserColumnGenerator());

    addComponents(textSearch, table);
    setExpandRatio(table, 1f);
    setHeight(100, Unit.PERCENTAGE);
    setWidth(300, Unit.PIXELS);
    addStyleName("users-list");
    setVisible(false);
}
 
开发者ID:hybridbpm,项目名称:hybridbpm,代码行数:37,代码来源:UsersMenu.java

示例6: AdaptiveTaskEditor

import com.vaadin.event.FieldEvents; //导入依赖的package包/类
public AdaptiveTaskEditor(DashboardTab panelView, Case case1) {
    this.panelView = panelView;
    this.case1 = case1;
    Design.read(this);

    btnSend.setIcon(FontAwesome.SEND);
    btnSend.addClickListener(this);
    btnProcess.addClickListener(this);

    TextComplete textComplete = new TextComplete();
    textComplete.extend(taskTitle,
            HybridbpmUI.getAccessAPI().findUserNamesByName(null),
            Arrays.asList(new String[]{"loan", "creditcard"}));

    taskTitle.addTextChangeListener(new FieldEvents.TextChangeListener() {

        @Override
        public void textChange(FieldEvents.TextChangeEvent event) {
            String text = event.getText();
            String[] lines = text.split(System.getProperty("line.separator"));
            if (lines != null && (lines.length > 1)) {
                taskTitle.setRows(lines.length + 2);
            }
        }
    });

    btnBack.addClickListener(this);
    btnBack.setStyleName(ValoTheme.BUTTON_LINK);
    btnBack.addStyleName(ValoTheme.BUTTON_SMALL);
    btnBack.setIcon(FontAwesome.ARROW_LEFT);
}
 
开发者ID:hybridbpm,项目名称:hybridbpm,代码行数:32,代码来源:AdaptiveTaskEditor.java

示例7: textChange

import com.vaadin.event.FieldEvents; //导入依赖的package包/类
@Override
public void textChange(FieldEvents.TextChangeEvent event) {
    applyFilterPattern(
            getTargetPropertyType(),
            getTargetPropertyId(),
            event.getText(),
            getTargetContainer());
}
 
开发者ID:tyl,项目名称:field-binder,代码行数:9,代码来源:SearchPatternTextField.java

示例8: initLayout

import com.vaadin.event.FieldEvents; //导入依赖的package包/类
protected void initLayout() {
	setModal(true);
	setSizeUndefined();
	setResizable(false);
	
	layout.setSizeUndefined();
	
	formLayout.setMargin(true);
	
	loginButton.addListener(this);
	
	panel.setVisible(false);
	panel.setContent(label);
	
	formLayout.addComponent(loginTf);
	formLayout.addComponent(passwordTf);
	formLayout.addComponent(loginButton);
	
	layout.addComponent(panel);
	layout.setComponentAlignment(panel, Alignment.MIDDLE_CENTER);
	layout.addComponent(formLayout);
	layout.setComponentAlignment(formLayout, Alignment.MIDDLE_CENTER);
	
	setContent(layout);
	loginButton.setClickShortcut(KeyCode.ENTER);
	
	addListener(new FieldEvents.FocusListener() {
		private static final long serialVersionUID = 1L;

		@Override
		public void focus(FocusEvent event) {
			loginTf.focus();
		}
	});
}
 
开发者ID:alejandro-du,项目名称:enterprise-app,代码行数:36,代码来源:AuthWindow.java

示例9: CubaSuggestionField

import com.vaadin.event.FieldEvents; //导入依赖的package包/类
public CubaSuggestionField() {
    setValidationVisible(false);
    serverRpc = new CubaSuggestionFieldServerRpc() {
        @Override
        public void searchSuggestions(String query) {
            if (searchExecutor != null) {
                searchExecutor.accept(query);
            }
        }

        @Override
        public void selectSuggestion(String suggestionId) {
            Object suggestion = keyMapper.get(suggestionId);
            setValue(suggestion);

            updateTextPresentation(getValue());
        }

        @Override
        public void onEnterKeyPressed(String currentSearchString) {
            if (enterActionHandler != null) {
                enterActionHandler.accept(currentSearchString);
            }
        }

        @Override
        public void onArrowDownKeyPressed(String currentSearchString) {
            if (arrowDownActionHandler != null) {
                arrowDownActionHandler.accept(currentSearchString);
            }
        }

        @Override
        public void cancelSearch() {
            cancelSearchHandler.run();
        }
    };
    registerRpc(serverRpc);

    focusBlurRpc = new FieldEvents.FocusAndBlurServerRpcImpl(this) {
        private static final long serialVersionUID = -780524775769549747L;

        @Override
        protected void fireEvent(Event event) {
            CubaSuggestionField.this.fireEvent(event);
        }
    };
    registerRpc(focusBlurRpc);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:50,代码来源:CubaSuggestionField.java

示例10: addBlurListener

import com.vaadin.event.FieldEvents; //导入依赖的package包/类
@Override
public void addBlurListener(FieldEvents.BlurListener listener) {
    addListener(FieldEvents.BlurEvent.EVENT_ID, FieldEvents.BlurEvent.class, listener,
            FieldEvents.BlurListener.blurMethod);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:6,代码来源:CubaManagedTabSheet.java

示例11: addListener

import com.vaadin.event.FieldEvents; //导入依赖的package包/类
@Override
@Deprecated
public void addListener(FieldEvents.BlurListener listener) {
    addBlurListener(listener);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:6,代码来源:CubaManagedTabSheet.java

示例12: removeBlurListener

import com.vaadin.event.FieldEvents; //导入依赖的package包/类
@Override
public void removeBlurListener(FieldEvents.BlurListener listener) {
    removeListener(FieldEvents.BlurEvent.EVENT_ID, FieldEvents.BlurEvent.class, listener);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:5,代码来源:CubaManagedTabSheet.java

示例13: removeListener

import com.vaadin.event.FieldEvents; //导入依赖的package包/类
@Override
@Deprecated
public void removeListener(FieldEvents.BlurListener listener) {
    removeBlurListener(listener);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:6,代码来源:CubaManagedTabSheet.java

示例14: addFocusListener

import com.vaadin.event.FieldEvents; //导入依赖的package包/类
@Override
public void addFocusListener(FieldEvents.FocusListener listener) {
    addListener(FieldEvents.FocusEvent.EVENT_ID, FieldEvents.FocusEvent.class, listener,
            FieldEvents.FocusListener.focusMethod);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:6,代码来源:CubaManagedTabSheet.java

示例15: removeFocusListener

import com.vaadin.event.FieldEvents; //导入依赖的package包/类
@Override
public void removeFocusListener(FieldEvents.FocusListener listener) {
    removeListener(FieldEvents.FocusEvent.EVENT_ID, FieldEvents.FocusEvent.class, listener);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:5,代码来源:CubaManagedTabSheet.java


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