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

Java MTextField类代码示例

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

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



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

示例1: onBecomingVisible

import org.vaadin.viritin.fields.MTextField; //导入依赖的package包/类
@Override
protected void onBecomingVisible() {
    super.onBecomingVisible();
    criteria = null;
    content = new MVerticalLayout().withMargin(false).withSpacing(false);
    nameField = new MTextField().withFullWidth().withInputPrompt(UserUIContext.getMessage(GenericI18Enum.ACTION_QUERY_BY_TEXT));
    content.with(nameField);

    content.with(FormSectionBuilder.build(UserUIContext.getMessage(GenericI18Enum.OPT_SHARED_TO_ME)).withStyleName("border-top"));
    addSharedSearchQueryInfo(allTasksQuery);
    addSharedSearchQueryInfo(allOpenTaskQuery);
    addSharedSearchQueryInfo(overdueTaskQuery);
    addSharedSearchQueryInfo(allClosedTaskQuery);
    addSharedSearchQueryInfo(myTasksQuery);
    addSharedSearchQueryInfo(tasksCreatedByMeQuery);
    addSharedSearchQueryInfo(newTasksThisWeekQuery);
    addSharedSearchQueryInfo(updateTasksThisWeekQuery);
    addSharedSearchQueryInfo(newTasksLastWeekQuery);
    addSharedSearchQueryInfo(updateTasksLastWeekQuery);
    setContent(content);
}
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:22,代码来源:TicketSearchInputView.java


示例2: constructBody

import org.vaadin.viritin.fields.MTextField; //导入依赖的package包/类
@Override
public ComponentContainer constructBody() {
    MHorizontalLayout basicSearchBody = new MHorizontalLayout().withMargin(true);
    basicSearchBody.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT);
    basicSearchBody.addComponent(new Label(UserUIContext.getMessage(GenericI18Enum.FORM_NAME) + ":"));
    nameField = new MTextField().withInputPrompt(UserUIContext.getMessage(GenericI18Enum.ACTION_QUERY_BY_TEXT))
            .withWidth(WebUIConstants.DEFAULT_CONTROL_WIDTH);
    basicSearchBody.addComponent(nameField);

    MButton searchBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_SEARCH), clickEvent -> callSearchAction())
            .withIcon(FontAwesome.SEARCH).withStyleName(WebThemes.BUTTON_ACTION)
            .withClickShortcut(ShortcutAction.KeyCode.ENTER);
    basicSearchBody.addComponent(searchBtn);

    MButton clearBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_CLEAR), clickEvent -> nameField.setValue(""))
            .withStyleName(WebThemes.BUTTON_OPTION);
    basicSearchBody.addComponent(clearBtn);
    return basicSearchBody;
}
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:20,代码来源:ProjectRoleSearchPanel.java


示例3: constructBody

import org.vaadin.viritin.fields.MTextField; //导入依赖的package包/类
@Override
public ComponentContainer constructBody() {
    MHorizontalLayout basicSearchBody = new MHorizontalLayout().withMargin(true);
    basicSearchBody.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT);
    Label nameLbl = new Label(UserUIContext.getMessage(GenericI18Enum.FORM_NAME) + ":");
    basicSearchBody.with(nameLbl);

    nameField = new MTextField().withInputPrompt(UserUIContext.getMessage(GenericI18Enum.ACTION_QUERY_BY_TEXT))
            .withWidth(WebUIConstants.DEFAULT_CONTROL_WIDTH);
    basicSearchBody.with(nameField);

    myItemCheckbox = new CheckBox(UserUIContext.getMessage(GenericI18Enum.OPT_MY_ITEMS));
    basicSearchBody.with(myItemCheckbox);

    MButton searchBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_SEARCH), clickEvent -> callSearchAction())
            .withIcon(FontAwesome.SEARCH).withStyleName(WebThemes.BUTTON_ACTION)
            .withClickShortcut(ShortcutAction.KeyCode.ENTER);
    basicSearchBody.with(searchBtn);

    MButton cancelBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_CLEAR), clickEvent -> nameField.setValue(""))
            .withStyleName(WebThemes.BUTTON_OPTION);
    basicSearchBody.with(cancelBtn);

    return basicSearchBody;
}
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:26,代码来源:ComponentSearchPanel.java


示例4: constructBody

import org.vaadin.viritin.fields.MTextField; //导入依赖的package包/类
@Override
public ComponentContainer constructBody() {
    MHorizontalLayout basicSearchBody = new MHorizontalLayout().withMargin(true);
    basicSearchBody.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT);

    Label nameLbl = new Label("Name:");
    basicSearchBody.with(nameLbl);

    nameField = new MTextField().withInputPrompt(UserUIContext.getMessage(GenericI18Enum.ACTION_QUERY_BY_TEXT))
            .withWidth(WebUIConstants.DEFAULT_CONTROL_WIDTH);
    basicSearchBody.with(nameField);

    MButton searchBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_SEARCH), clickEvent -> callSearchAction())
            .withIcon(FontAwesome.SEARCH).withStyleName(WebThemes.BUTTON_ACTION)
            .withClickShortcut(ShortcutAction.KeyCode.ENTER);
    basicSearchBody.with(searchBtn);

    MButton cancelBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_CLEAR), clickEvent -> nameField.setValue(""))
            .withStyleName(WebThemes.BUTTON_OPTION);
    basicSearchBody.with(cancelBtn);

    return basicSearchBody;
}
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:24,代码来源:VersionSearchPanel.java


示例5: constructBody

import org.vaadin.viritin.fields.MTextField; //导入依赖的package包/类
@Override
public ComponentContainer constructBody() {
    MHorizontalLayout basicSearchBody = new MHorizontalLayout().withMargin(true);

    nameField = new MTextField().withInputPrompt(UserUIContext.getMessage(GenericI18Enum.ACTION_QUERY_BY_TEXT))
            .withWidth(WebUIConstants.DEFAULT_CONTROL_WIDTH);
    basicSearchBody.with(nameField).withAlign(nameField, Alignment.MIDDLE_CENTER);

    MButton searchBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_SEARCH), clickEvent ->
            callSearchAction()).withIcon(FontAwesome.SEARCH).withStyleName(WebThemes.BUTTON_ACTION)
            .withClickShortcut(ShortcutAction.KeyCode.ENTER);
    basicSearchBody.with(searchBtn).withAlign(searchBtn, Alignment.MIDDLE_LEFT);

    MButton cancelBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_CLEAR),
            clickEvent -> nameField.setValue("")).withStyleName(WebThemes.BUTTON_OPTION);
    basicSearchBody.with(cancelBtn).withAlign(cancelBtn, Alignment.MIDDLE_CENTER);

    MButton advancedSearchBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_ADVANCED_SEARCH),
            clickEvent -> moveToAdvancedSearchLayout()).withStyleName(WebThemes.BUTTON_LINK);
    basicSearchBody.with(advancedSearchBtn).withAlign(advancedSearchBtn, Alignment.MIDDLE_CENTER);

    return basicSearchBody;
}
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:24,代码来源:ProjectSearchPanel.java


示例6: onCreateField

import org.vaadin.viritin.fields.MTextField; //导入依赖的package包/类
@Override
protected Field<?> onCreateField(Object propertyId) {
    if (SimpleUser.Field.roleid.equalTo(propertyId)) {
        return new AdminRoleSelectionField();
    } else if (User.Field.email.equalTo(propertyId) || User.Field.firstname.equalTo(propertyId) ||
            User.Field.lastname.equalTo(propertyId)) {
        return new MTextField().withNullRepresentation("").withRequired(true)
                .withRequiredError("This field must be not null");
    } else if (propertyId.equals("dateofbirth")) {
        return new DateSelectionField();
    } else if (propertyId.equals("timezone")) {
        return new TimeZoneSelectionField(false);
    } else if (propertyId.equals("country")) {
        final CountryComboBox cboCountry = new CountryComboBox();
        cboCountry.addValueChangeListener(valueChangeEvent -> user.setCountry((String) cboCountry.getValue()));
        return cboCountry;
    } else if (User.Field.password.equalTo(propertyId)) {
        return new MPasswordField();
    }
    return null;
}
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:22,代码来源:UserAddViewImpl.java


示例7: constructBody

import org.vaadin.viritin.fields.MTextField; //导入依赖的package包/类
@Override
public ComponentContainer constructBody() {
    MHorizontalLayout basicSearchBody = new MHorizontalLayout().withMargin(true)
            .with(new Label(UserUIContext.getMessage(GenericI18Enum.FORM_NAME) + ":"));

    nameField = new MTextField().withInputPrompt(UserUIContext.getMessage(GenericI18Enum.ACTION_QUERY_BY_TEXT))
            .withWidth(WebUIConstants.DEFAULT_CONTROL_WIDTH);
    basicSearchBody.addComponent(nameField);

    MButton searchBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_SEARCH), clickEvent -> callSearchAction())
            .withIcon(FontAwesome.SEARCH).withStyleName(WebThemes.BUTTON_ACTION)
            .withClickShortcut(ShortcutAction.KeyCode.ENTER);
    basicSearchBody.addComponent(searchBtn);

    MButton clearBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_CLEAR), clickEvent -> nameField.setValue(""))
            .withStyleName(WebThemes.BUTTON_OPTION);
    basicSearchBody.addComponent(clearBtn);
    basicSearchBody.setComponentAlignment(clearBtn, Alignment.MIDDLE_LEFT);
    return basicSearchBody;
}
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:21,代码来源:RoleSearchPanel.java


示例8: constructBody

import org.vaadin.viritin.fields.MTextField; //导入依赖的package包/类
@Override
public ComponentContainer constructBody() {
    MHorizontalLayout basicSearchBody = new MHorizontalLayout().withMargin(true);
    nameField = new MTextField().withInputPrompt(UserUIContext.getMessage(GenericI18Enum.ACTION_QUERY_BY_TEXT))
            .withWidth(WebUIConstants.DEFAULT_CONTROL_WIDTH);
    basicSearchBody.with(nameField).withAlign(nameField, Alignment.MIDDLE_CENTER);

    this.myItemCheckbox = new CheckBox(UserUIContext.getMessage(GenericI18Enum.OPT_MY_ITEMS));
    basicSearchBody.with(myItemCheckbox).withAlign(myItemCheckbox, Alignment.MIDDLE_CENTER);

    MButton searchBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_SEARCH), clickEvent -> callSearchAction())
            .withIcon(FontAwesome.SEARCH).withStyleName(WebThemes.BUTTON_ACTION)
            .withClickShortcut(ShortcutAction.KeyCode.ENTER);
    basicSearchBody.with(searchBtn).withAlign(searchBtn, Alignment.MIDDLE_LEFT);

    MButton cancelBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_CLEAR), clickEvent -> nameField.setValue(""))
            .withStyleName(WebThemes.BUTTON_OPTION);
    basicSearchBody.with(cancelBtn).withAlign(cancelBtn, Alignment.MIDDLE_CENTER);

    MButton advancedSearchBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_ADVANCED_SEARCH),
            clickEvent -> moveToAdvancedSearchLayout()).withStyleName(WebThemes.BUTTON_LINK);
    basicSearchBody.with(advancedSearchBtn).withAlign(advancedSearchBtn, Alignment.MIDDLE_CENTER);
    return basicSearchBody;
}
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:25,代码来源:ContactSearchPanel.java


示例9: constructBody

import org.vaadin.viritin.fields.MTextField; //导入依赖的package包/类
@Override
public ComponentContainer constructBody() {
    MHorizontalLayout basicSearchBody = new MHorizontalLayout().withMargin(true);

    nameField = new MTextField().withInputPrompt(UserUIContext.getMessage(GenericI18Enum.ACTION_QUERY_BY_TEXT))
            .withWidth(WebUIConstants.DEFAULT_CONTROL_WIDTH);
    basicSearchBody.with(nameField).withAlign(nameField, Alignment.MIDDLE_LEFT);

    this.myItemCheckbox = new CheckBox(UserUIContext.getMessage(GenericI18Enum.OPT_MY_ITEMS));
    basicSearchBody.with(myItemCheckbox).withAlign(myItemCheckbox, Alignment.MIDDLE_CENTER);

    MButton searchBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_SEARCH), clickEvent -> callSearchAction())
            .withIcon(FontAwesome.SEARCH).withStyleName(WebThemes.BUTTON_ACTION)
            .withClickShortcut(ShortcutAction.KeyCode.ENTER);
    basicSearchBody.with(searchBtn).withAlign(searchBtn, Alignment.MIDDLE_LEFT);

    MButton clearBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_CLEAR), clickEvent -> nameField.setValue(""))
            .withStyleName(WebThemes.BUTTON_OPTION);
    basicSearchBody.with(clearBtn).withAlign(clearBtn, Alignment.MIDDLE_LEFT);
    return basicSearchBody;
}
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:22,代码来源:ActivitySearchPanel.java


示例10: constructBody

import org.vaadin.viritin.fields.MTextField; //导入依赖的package包/类
@Override
public ComponentContainer constructBody() {
    MHorizontalLayout basicSearchBody = new MHorizontalLayout().withMargin(true);

    subjectField = new MTextField().withInputPrompt(UserUIContext.getMessage(GenericI18Enum.ACTION_QUERY_BY_TEXT))
            .withWidth(WebUIConstants.DEFAULT_CONTROL_WIDTH);
    basicSearchBody.with(subjectField).withAlign(subjectField, Alignment.MIDDLE_CENTER);

    this.myItemCheckbox = new CheckBox(UserUIContext.getMessage(GenericI18Enum.OPT_MY_ITEMS));
    basicSearchBody.with(myItemCheckbox).withAlign(myItemCheckbox, Alignment.MIDDLE_CENTER);

    MButton searchBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_SEARCH), clickEvent -> callSearchAction())
            .withIcon(FontAwesome.SEARCH).withStyleName(WebThemes.BUTTON_ACTION);

    basicSearchBody.with(searchBtn).withAlign(searchBtn, Alignment.MIDDLE_LEFT);

    MButton cancelBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_CLEAR), clickEvent -> subjectField.setValue(""))
            .withStyleName(WebThemes.BUTTON_OPTION);
    basicSearchBody.with(cancelBtn).withAlign(cancelBtn, Alignment.MIDDLE_CENTER);

    MButton advancedSearchBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_ADVANCED_SEARCH),
            clickEvent -> moveToAdvancedSearchLayout()).withStyleName(WebThemes.BUTTON_LINK);
    basicSearchBody.with(advancedSearchBtn).withAlign(advancedSearchBtn, Alignment.MIDDLE_CENTER);
    return basicSearchBody;
}
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:26,代码来源:CaseSearchPanel.java


示例11: onBecomingVisible

import org.vaadin.viritin.fields.MTextField; //导入依赖的package包/类
@Override
protected void onBecomingVisible() {
    super.onBecomingVisible();
    MVerticalLayout content = new MVerticalLayout();
    nameField = new MTextField().withFullWidth().withInputPrompt(UserUIContext.getMessage(GenericI18Enum.ACTION_QUERY_BY_TEXT));
    content.with(nameField);

    setContent(content);
}
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:10,代码来源:MessageSearchInputView.java


示例12: constructBody

import org.vaadin.viritin.fields.MTextField; //导入依赖的package包/类
@Override
public ComponentContainer constructBody() {
    MHorizontalLayout basicSearchBody = new MHorizontalLayout().withMargin(true);

    Label nameLbl = new Label(UserUIContext.getMessage(GenericI18Enum.FORM_NAME) + ":");
    basicSearchBody.with(nameLbl).withAlign(nameLbl, Alignment.MIDDLE_LEFT);

    nameField = new MTextField().withInputPrompt(UserUIContext.getMessage(GenericI18Enum.ACTION_QUERY_BY_TEXT))
            .withWidth(WebUIConstants.DEFAULT_CONTROL_WIDTH);
    basicSearchBody.with(nameField).withAlign(nameField, Alignment.MIDDLE_CENTER);

    myItemCheckbox = new CheckBox(UserUIContext.getMessage(GenericI18Enum.OPT_MY_ITEMS));
    basicSearchBody.with(myItemCheckbox).withAlign(myItemCheckbox, Alignment.MIDDLE_CENTER);

    MButton searchBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_SEARCH), clickEvent -> callSearchAction())
            .withIcon(FontAwesome.SEARCH).withStyleName(WebThemes.BUTTON_ACTION)
            .withClickShortcut(ShortcutAction.KeyCode.ENTER);
    basicSearchBody.with(searchBtn).withAlign(searchBtn, Alignment.MIDDLE_LEFT);

    MButton cancelBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_CLEAR), clickEvent -> nameField.setValue(""))
            .withStyleName(WebThemes.BUTTON_OPTION);
    basicSearchBody.with(cancelBtn).withAlign(cancelBtn, Alignment.MIDDLE_CENTER);

    if (canSwitchToAdvanceLayout) {
        MButton advancedSearchBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_ADVANCED_SEARCH),
                clickEvent -> moveToAdvancedSearchLayout()).withStyleName(WebThemes.BUTTON_LINK);
        basicSearchBody.with(advancedSearchBtn).withAlign(advancedSearchBtn, Alignment.MIDDLE_CENTER);
    }
    return basicSearchBody;
}
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:31,代码来源:TicketSearchPanel.java


示例13: createBasicSearchLayout

import org.vaadin.viritin.fields.MTextField; //导入依赖的package包/类
private void createBasicSearchLayout() {
    nameField = new MTextField().withInputPrompt(UserUIContext.getMessage(GenericI18Enum.ACTION_QUERY_BY_TEXT))
            .withWidth(WebUIConstants.DEFAULT_CONTROL_WIDTH);

    MButton searchBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_SEARCH), clickEvent -> doSearch())
            .withStyleName(WebThemes.BUTTON_ACTION).withIcon(FontAwesome.SEARCH)
            .withClickShortcut(ShortcutAction.KeyCode.ENTER);
    final MHorizontalLayout basicSearchBody = new MHorizontalLayout(nameField, searchBtn).withWidthUndefined()
            .withAlign(nameField, Alignment.MIDDLE_LEFT);
    this.setCompositionRoot(basicSearchBody);
}
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:12,代码来源:MessageListViewImpl.java


示例14: constructBody

import org.vaadin.viritin.fields.MTextField; //导入依赖的package包/类
@Override
public ComponentContainer constructBody() {
    MHorizontalLayout basicSearchBody = new MHorizontalLayout().withMargin(true);
    Label nameLbl = new Label(UserUIContext.getMessage(GenericI18Enum.FORM_NAME) + ":");
    basicSearchBody.with(nameLbl).withAlign(nameLbl, Alignment.MIDDLE_LEFT);

    nameField = new MTextField().withInputPrompt(UserUIContext.getMessage(GenericI18Enum.ACTION_QUERY_BY_TEXT))
            .withWidth(WebUIConstants.DEFAULT_CONTROL_WIDTH);
    basicSearchBody.with(nameField).withAlign(nameLbl, Alignment.MIDDLE_CENTER);

    myItemCheckbox = new CheckBox(UserUIContext.getMessage(GenericI18Enum.OPT_MY_ITEMS));
    basicSearchBody.with(myItemCheckbox).withAlign(myItemCheckbox, Alignment.MIDDLE_CENTER);

    MButton searchBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_SEARCH), clickEvent -> callSearchAction())
            .withIcon(FontAwesome.SEARCH).withStyleName(WebThemes.BUTTON_ACTION)
            .withClickShortcut(ShortcutAction.KeyCode.ENTER);
    basicSearchBody.with(searchBtn).withAlign(searchBtn, Alignment.MIDDLE_LEFT);

    MButton cancelBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_CLEAR), clickEvent -> nameField.setValue(""))
            .withStyleName(WebThemes.BUTTON_OPTION);
    basicSearchBody.addComponent(cancelBtn);

    if (canSwitchToAdvanceLayout) {
        MButton advancedSearchBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_ADVANCED_SEARCH),
                clickEvent -> moveToAdvancedSearchLayout()).withStyleName(WebThemes.BUTTON_LINK);
        basicSearchBody.with(advancedSearchBtn).withAlign(advancedSearchBtn, Alignment.MIDDLE_CENTER);
    }

    return basicSearchBody;
}
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:31,代码来源:BugSearchPanel.java


示例15: onCreateField

import org.vaadin.viritin.fields.MTextField; //导入依赖的package包/类
@Override
protected Field<?> onCreateField(final Object propertyId) {
    if (propertyId.equals("description")) {
        return new RichTextArea();
    } else if (propertyId.equals("rolename")) {
        return new MTextField().withNullRepresentation("").withRequired(true)
                .withRequiredError(UserUIContext.getMessage(ErrorI18nEnum.FIELD_MUST_NOT_NULL,
                        UserUIContext.getMessage(GenericI18Enum.FORM_NAME)));

    }
    return null;
}
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:13,代码来源:RoleAddViewImpl.java


示例16: constructBody

import org.vaadin.viritin.fields.MTextField; //导入依赖的package包/类
@Override
public ComponentContainer constructBody() {
    MHorizontalLayout layout = new MHorizontalLayout().withMargin(true);

    nameField = new MTextField().withInputPrompt(UserUIContext.getMessage(GenericI18Enum.ACTION_QUERY_BY_TEXT))
            .withWidth(WebUIConstants.DEFAULT_CONTROL_WIDTH);
    layout.with(nameField).withAlign(nameField, Alignment.MIDDLE_CENTER);

    myItemCheckbox = new CheckBox(UserUIContext.getMessage(GenericI18Enum.OPT_MY_ITEMS));
    layout.with(myItemCheckbox).withAlign(myItemCheckbox, Alignment.MIDDLE_CENTER);

    MButton searchBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_SEARCH), clickEvent -> callSearchAction())
            .withIcon(FontAwesome.SEARCH).withStyleName(WebThemes.BUTTON_ACTION)
            .withClickShortcut(ShortcutAction.KeyCode.ENTER);
    layout.with(searchBtn).withAlign(searchBtn, Alignment.MIDDLE_LEFT);

    MButton cancelBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_CLEAR), clickEvent -> nameField.setValue(""))
            .withStyleName(WebThemes.BUTTON_OPTION);

    layout.with(cancelBtn).withAlign(cancelBtn, Alignment.MIDDLE_CENTER);

    MButton advancedSearchBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_ADVANCED_SEARCH),
            clickEvent -> moveToAdvancedSearchLayout()).withStyleName(WebThemes.BUTTON_LINK);

    layout.with(advancedSearchBtn).withAlign(advancedSearchBtn, Alignment.MIDDLE_CENTER);
    return layout;
}
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:28,代码来源:LeadSearchPanel.java


示例17: onCreateField

import org.vaadin.viritin.fields.MTextField; //导入依赖的package包/类
@Override
protected Field<?> onCreateField(Object propertyId) {
    if (propertyId.equals("campaignid")) {
        return new CampaignSelectionField();
    } else if (propertyId.equals("accountid")) {
        AccountSelectionField accountField = new AccountSelectionField();
        accountField.setRequired(true);
        return accountField;
    } else if (propertyId.equals("opportunityname")) {
        MTextField tf = new MTextField();
        if (isValidateForm) {
            tf.withNullRepresentation("").withRequired(true)
                    .withRequiredError(UserUIContext.getMessage(ErrorI18nEnum.FIELD_MUST_NOT_NULL,
                            UserUIContext.getMessage(GenericI18Enum.FORM_NAME)));
        }
        return tf;
    } else if (propertyId.equals("currencyid")) {
        return new CurrencyComboBoxField();
    } else if (propertyId.equals("salesstage")) {
        return new OpportunitySalesStageComboBox();
    } else if (propertyId.equals("opportunitytype")) {
        return new OpportunityTypeComboBox();
    } else if (propertyId.equals("source")) {
        return new LeadSourceComboBox();
    } else if (propertyId.equals("description")) {
        return new RichTextArea();
    } else if (propertyId.equals("assignuser")) {
        return new ActiveUserComboBox();
    } else if (Opportunity.Field.amount.equalTo(propertyId)) {
        return new DoubleField();
    } else if (Opportunity.Field.probability.equalTo(propertyId)) {
        return new IntegerField();
    }

    return null;
}
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:37,代码来源:OpportunityEditFormFieldFactory.java


示例18: constructBody

import org.vaadin.viritin.fields.MTextField; //导入依赖的package包/类
@Override
public ComponentContainer constructBody() {
    MHorizontalLayout layout = new MHorizontalLayout().withMargin(true);

    nameField = new MTextField().withInputPrompt(UserUIContext.getMessage(GenericI18Enum.ACTION_QUERY_BY_TEXT))
            .withWidth(WebUIConstants.DEFAULT_CONTROL_WIDTH);
    layout.with(nameField).withAlign(nameField, Alignment.MIDDLE_CENTER);

    this.myItemCheckbox = new CheckBox(UserUIContext.getMessage(GenericI18Enum.OPT_MY_ITEMS));
    layout.with(myItemCheckbox).withAlign(myItemCheckbox, Alignment.MIDDLE_CENTER);

    MButton searchBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_SEARCH), clickEvent -> callSearchAction())
            .withIcon(FontAwesome.SEARCH).withStyleName(WebThemes.BUTTON_ACTION)
            .withClickShortcut(ShortcutAction.KeyCode.ENTER);
    layout.with(searchBtn).withAlign(searchBtn, Alignment.MIDDLE_LEFT);

    MButton cancelBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_CLEAR), clickEvent -> nameField.setValue(""))
            .withStyleName(WebThemes.BUTTON_OPTION);
    layout.with(cancelBtn).withAlign(cancelBtn, Alignment.MIDDLE_CENTER);

    MButton advancedSearchBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_ADVANCED_SEARCH),
            clickEvent -> moveToAdvancedSearchLayout())
            .withStyleName(WebThemes.BUTTON_LINK);

    layout.with(advancedSearchBtn).withAlign(advancedSearchBtn, Alignment.MIDDLE_CENTER);
    return layout;
}
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:28,代码来源:OpportunitySearchPanel.java


示例19: onCreateField

import org.vaadin.viritin.fields.MTextField; //导入依赖的package包/类
@Override
protected Field<?> onCreateField(Object propertyId) {
    if (propertyId.equals("firstname") || propertyId.equals("prefix")) {
        return firstNamePrefixField;
    } else if (propertyId.equals("leadsource")) {
        return new LeadSourceComboBox();
    } else if (propertyId.equals("accountid")) {
        return new AccountSelectionField();
    } else if (propertyId.equals("lastname")) {
        MTextField tf = new MTextField();
        if (isValidateForm) {
            tf.withNullRepresentation("").withRequired(true)
                    .withRequiredError(UserUIContext.getMessage(ErrorI18nEnum.FIELD_MUST_NOT_NULL,
                            UserUIContext.getMessage(GenericI18Enum.FORM_LASTNAME)));
        }

        return tf;
    } else if (propertyId.equals("description")) {
        return new RichTextArea();
    } else if (propertyId.equals("assignuser")) {
        ActiveUserComboBox userBox = new ActiveUserComboBox();
        userBox.select(attachForm.getBean().getAssignuser());
        return userBox;
    } else if (propertyId.equals("primcountry") || propertyId.equals("othercountry")) {
        return new CountryComboBox();
    } else if (propertyId.equals("birthday")) {
        return new DateSelectionField();
    }
    return null;
}
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:31,代码来源:ContactEditFormFieldFactory.java


示例20: constructBody

import org.vaadin.viritin.fields.MTextField; //导入依赖的package包/类
@Override
public ComponentContainer constructBody() {
    MHorizontalLayout basicSearchBody = new MHorizontalLayout().withMargin(true);

    nameField = new MTextField().withInputPrompt(UserUIContext.getMessage(GenericI18Enum.ACTION_QUERY_BY_TEXT))
            .withWidth(WebUIConstants.DEFAULT_CONTROL_WIDTH);
    basicSearchBody.with(nameField).withAlign(nameField, Alignment.MIDDLE_CENTER);

    myItemCheckbox = new CheckBox(UserUIContext.getMessage(GenericI18Enum.OPT_MY_ITEMS));
    myItemCheckbox.addStyleName(ValoTheme.CHECKBOX_SMALL);

    basicSearchBody.with(myItemCheckbox).withAlign(myItemCheckbox, Alignment.MIDDLE_CENTER);

    MButton searchBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_SEARCH), clickEvent -> callSearchAction())
            .withIcon(FontAwesome.SEARCH).withStyleName(WebThemes.BUTTON_ACTION)
            .withClickShortcut(ShortcutAction.KeyCode.ENTER);

    basicSearchBody.with(searchBtn).withAlign(searchBtn, Alignment.MIDDLE_LEFT);

    MButton cancelBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_CLEAR), clickEvent -> nameField.setValue(""))
            .withStyleName(WebThemes.BUTTON_OPTION);
    basicSearchBody.with(cancelBtn).withAlign(cancelBtn, Alignment.MIDDLE_CENTER);

    MButton advancedSearchBtn = new MButton(UserUIContext.getMessage(GenericI18Enum.BUTTON_ADVANCED_SEARCH),
            clickEvent -> moveToAdvancedSearchLayout()).withStyleName(WebThemes.BUTTON_LINK);
    basicSearchBody.with(advancedSearchBtn).withAlign(advancedSearchBtn, Alignment.MIDDLE_CENTER);
    return basicSearchBody;
}
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:29,代码来源:AccountSearchPanel.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java CharValue类代码示例发布时间:2022-05-22
下一篇:
Java PoolMetrics类代码示例发布时间: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