Example usage for com.vaadin.server FontAwesome FEMALE

List of usage examples for com.vaadin.server FontAwesome FEMALE

Introduction

In this page you can find the example usage for com.vaadin.server FontAwesome FEMALE.

Prototype

FontAwesome FEMALE

To view the source code for com.vaadin.server FontAwesome FEMALE.

Click Source Link

Usage

From source file:com.ies.schoolos.ui.mobile.info.layout.PersonalLayout.java

private void motherGroup() {
    motherGroup = new VerticalComponentGroup();
    motherGroup.setSizeUndefined();/*from  ww w.  j  a v  a 2  s  .  co m*/

    addTab(motherGroup, "", FontAwesome.FEMALE);

    mPeopleIdType = new OptionGroup("", new PeopleIdType());
    mPeopleIdType.setItemCaptionPropertyId("name");
    mPeopleIdType.setImmediate(true);
    mPeopleIdType.setNullSelectionAllowed(false);
    mPeopleIdType.setWidth("-1px");
    mPeopleIdType.setHeight("-1px");
    motherGroup.addComponent(mPeopleIdType);

    mPeopleid = new TextField("");
    mPeopleid.setInputPrompt("");
    mPeopleid.setImmediate(false);
    mPeopleid.setWidth("-1px");
    mPeopleid.setHeight("-1px");
    mPeopleid.setNullRepresentation("");
    mPeopleid.addTextChangeListener(new TextChangeListener() {
        private static final long serialVersionUID = 1L;

        @Override
        public void textChange(TextChangeEvent event) {
            if (event.getText() != null) {
                if (event.getText().length() >= 13) {
                    fSqlContainer.addContainerFilter(new Equal(FamilySchema.PEOPLE_ID, event.getText()));
                    if (fSqlContainer.size() > 0) {
                        Item item = fSqlContainer.getItem(fSqlContainer.getIdByIndex(0));
                        motherBinder.setItemDataSource(item);
                        pkStore[1] = item.getItemProperty(FamilySchema.FAMILY_ID).getValue();
                        motherBinder.setEnabled(false);
                        isDuplicateMother = true;
                    }
                    fSqlContainer.removeAllContainerFilters();
                }
            }
        }
    });
    motherGroup.addComponent(mPeopleid);

    mPrename = new NativeSelect("", new Prename());
    //mPrename.setInputPrompt("??");
    mPrename.setItemCaptionPropertyId("name");
    mPrename.setImmediate(true);
    mPrename.setNullSelectionAllowed(false);
    mPrename.setRequired(true);
    mPrename.setWidth("-1px");
    mPrename.setHeight("-1px");
    //mPrename.setFilteringMode(FilteringMode.CONTAINS);
    motherGroup.addComponent(mPrename);

    mFirstname = new TextField("");
    mFirstname.setInputPrompt("");
    mFirstname.setImmediate(false);
    mFirstname.setRequired(true);
    mFirstname.setWidth("-1px");
    mFirstname.setHeight("-1px");
    mFirstname.setNullRepresentation("");
    motherGroup.addComponent(mFirstname);

    mLastname = new TextField("?");
    mLastname.setInputPrompt("?");
    mLastname.setImmediate(false);
    mLastname.setRequired(true);
    mLastname.setWidth("-1px");
    mLastname.setHeight("-1px");
    mLastname.setNullRepresentation("");
    motherGroup.addComponent(mLastname);

    mFirstnameNd = new TextField("?");
    mFirstnameNd.setInputPrompt("?");
    mFirstnameNd.setImmediate(false);
    mFirstnameNd.setWidth("-1px");
    mFirstnameNd.setHeight("-1px");
    mFirstnameNd.setNullRepresentation("");
    motherGroup.addComponent(mFirstnameNd);

    mLastnameNd = new TextField("??");
    mLastnameNd.setInputPrompt("??");
    mLastnameNd.setImmediate(false);
    mLastnameNd.setWidth("-1px");
    mLastnameNd.setHeight("-1px");
    mLastnameNd.setNullRepresentation("");
    motherGroup.addComponent(mLastnameNd);

    mGender = new OptionGroup("", new Gender());
    mGender.setItemCaptionPropertyId("name");
    mGender.setImmediate(true);
    mGender.setNullSelectionAllowed(false);
    mGender.setRequired(true);
    mGender.setWidth("-1px");
    mGender.setHeight("-1px");
    motherGroup.addComponent(mGender);

    mReligion = new NativeSelect("", new Religion());
    //mReligion.setInputPrompt("??");
    mReligion.setItemCaptionPropertyId("name");
    mReligion.setImmediate(true);
    mReligion.setNullSelectionAllowed(false);
    mReligion.setRequired(true);
    mReligion.setWidth("-1px");
    mReligion.setHeight("-1px");
    //mReligion.setFilteringMode(FilteringMode.CONTAINS);
    motherGroup.addComponent(mReligion);

    mRace = new NativeSelect("", new Race());
    //mRace.setInputPrompt("??");
    mRace.setItemCaptionPropertyId("name");
    mRace.setImmediate(true);
    mRace.setNullSelectionAllowed(false);
    mRace.setRequired(true);
    mRace.setWidth("-1px");
    mRace.setHeight("-1px");
    //mRace.setFilteringMode(FilteringMode.CONTAINS);
    motherGroup.addComponent(mRace);

    mNationality = new NativeSelect("?", new Nationality());
    //mNationality.setInputPrompt("??");
    mNationality.setItemCaptionPropertyId("name");
    mNationality.setImmediate(true);
    mNationality.setNullSelectionAllowed(false);
    mNationality.setRequired(true);
    mNationality.setWidth("-1px");
    mNationality.setHeight("-1px");
    //mNationality.setFilteringMode(FilteringMode.CONTAINS);
    motherGroup.addComponent(mNationality);

    mBirthDate = new PopupDateField("   ?");
    mBirthDate.setInputPrompt("//");
    mBirthDate.setImmediate(false);
    mBirthDate.setWidth("-1px");
    mBirthDate.setHeight("-1px");
    mBirthDate.setDateFormat("dd/MM/yyyy");
    mBirthDate.setLocale(new Locale("th", "TH"));
    motherGroup.addComponent(mBirthDate);

    mTel = new TextField("");
    mTel.setInputPrompt("");
    mTel.setImmediate(false);
    mTel.setWidth("-1px");
    mTel.setHeight("-1px");
    mTel.setNullRepresentation("");
    motherGroup.addComponent(mTel);

    mMobile = new TextField("");
    mMobile.setInputPrompt("");
    mMobile.setImmediate(false);
    mMobile.setWidth("-1px");
    mMobile.setHeight("-1px");
    mMobile.setNullRepresentation("");
    motherGroup.addComponent(mMobile);

    mEmail = new TextField("");
    mEmail.setInputPrompt("");
    mEmail.setImmediate(false);
    mEmail.setWidth("-1px");
    mEmail.setHeight("-1px");
    mEmail.setNullRepresentation("");
    mEmail.addValidator(new EmailValidator("?"));
    motherGroup.addComponent(mEmail);

    mSalary = new NumberField("");
    mSalary.setInputPrompt("");
    mSalary.setImmediate(false);
    mSalary.setWidth("-1px");
    mSalary.setHeight("-1px");
    mSalary.setNullRepresentation("");
    motherGroup.addComponent(mSalary);

    mAliveStatus = new NativeSelect("", new AliveStatus());
    //mAliveStatus.setInputPrompt("??");
    mAliveStatus.setItemCaptionPropertyId("name");
    mAliveStatus.setImmediate(true);
    mAliveStatus.setNullSelectionAllowed(false);
    mAliveStatus.setRequired(true);
    mAliveStatus.setWidth("-1px");
    mAliveStatus.setHeight("-1px");
    //mAliveStatus.setFilteringMode(FilteringMode.CONTAINS);
    motherGroup.addComponent(mAliveStatus);

    mOccupation = new NativeSelect("", new Occupation());
    //mOccupation.setInputPrompt("??");
    mOccupation.setItemCaptionPropertyId("name");
    mOccupation.setImmediate(true);
    mOccupation.setNullSelectionAllowed(false);
    mOccupation.setRequired(true);
    mOccupation.setWidth("-1px");
    mOccupation.setHeight("-1px");
    //mOccupation.setFilteringMode(FilteringMode.CONTAINS);
    motherGroup.addComponent(mOccupation);

    mJobAddress = new TextArea("");
    mJobAddress.setInputPrompt("  ");
    mJobAddress.setImmediate(false);
    mJobAddress.setWidth("-1px");
    mJobAddress.setHeight("-1px");
    mJobAddress.setNullRepresentation("");
    motherGroup.addComponent(mJobAddress);

    mCurrentAddress = new TextArea("");
    mCurrentAddress.setInputPrompt("  ");
    mCurrentAddress.setImmediate(false);
    mCurrentAddress.setWidth("-1px");
    mCurrentAddress.setHeight("-1px");
    mCurrentAddress.setNullRepresentation("");
    motherGroup.addComponent(mCurrentAddress);

    mCurrentProvinceId = new NativeSelect("", new Province());
    //mCurrentProvinceId.setInputPrompt("??");
    mCurrentProvinceId.setItemCaptionPropertyId("name");
    mCurrentProvinceId.setImmediate(true);
    mCurrentProvinceId.setNullSelectionAllowed(false);
    mCurrentProvinceId.setWidth("-1px");
    mCurrentProvinceId.setHeight("-1px");
    //mCurrentProvinceId.setFilteringMode(FilteringMode.CONTAINS);
    mCurrentProvinceId.addValueChangeListener(new ValueChangeListener() {
        private static final long serialVersionUID = 1L;

        @Override
        public void valueChange(ValueChangeEvent event) {
            if (event.getProperty().getValue() != null)
                mCurrentDistrict.setContainerDataSource(
                        new District(Integer.parseInt(event.getProperty().getValue().toString())));
        }
    });
    motherGroup.addComponent(mCurrentProvinceId);

    mCurrentDistrict = new NativeSelect("");
    //mCurrentDistrict.setInputPrompt("??");
    mCurrentDistrict.setItemCaptionPropertyId("name");
    mCurrentDistrict.setImmediate(true);
    mCurrentDistrict.setNullSelectionAllowed(false);
    mCurrentDistrict.setWidth("-1px");
    mCurrentDistrict.setHeight("-1px");
    //mCurrentDistrict.setFilteringMode(FilteringMode.CONTAINS);
    mCurrentDistrict.addValueChangeListener(new ValueChangeListener() {
        private static final long serialVersionUID = 1L;

        @Override
        public void valueChange(ValueChangeEvent event) {
            if (event.getProperty().getValue() != null) {
                mCurrentCity.setContainerDataSource(
                        new City(Integer.parseInt(event.getProperty().getValue().toString())));
                mCurrentPostcode.setContainerDataSource(
                        new Postcode(Integer.parseInt(event.getProperty().getValue().toString())));
            }
        }
    });
    motherGroup.addComponent(mCurrentDistrict);

    mCurrentCity = new NativeSelect("");
    //mCurrentCity.setInputPrompt("??");
    mCurrentCity.setItemCaptionPropertyId("name");
    mCurrentCity.setImmediate(true);
    mCurrentCity.setNullSelectionAllowed(false);
    mCurrentCity.setWidth("-1px");
    mCurrentCity.setHeight("-1px");
    //mCurrentCity.setFilteringMode(FilteringMode.CONTAINS);
    motherGroup.addComponent(mCurrentCity);

    mCurrentPostcode = new NativeSelect("");
    //mCurrentPostcode.setInputPrompt("??");
    mCurrentPostcode.setItemCaptionPropertyId("name");
    mCurrentPostcode.setImmediate(true);
    mCurrentPostcode.setNullSelectionAllowed(false);
    mCurrentPostcode.setWidth("-1px");
    mCurrentPostcode.setHeight("-1px");
    //mCurrentPostcode.setFilteringMode(FilteringMode.CONTAINS);
    motherGroup.addComponent(mCurrentPostcode);

    HorizontalLayout buttonLayout = new HorizontalLayout();
    buttonLayout.setSpacing(true);
    buttonLayout.setWidth("100%");
    motherGroup.addComponent(buttonLayout);

    fatherBack = new Button(FontAwesome.ARROW_LEFT);
    fatherBack.setWidth("100%");
    fatherBack.addClickListener(new ClickListener() {
        private static final long serialVersionUID = 1L;

        @Override
        public void buttonClick(ClickEvent event) {
            setSelectedTab(fatherGroup);
        }
    });
    buttonLayout.addComponents(fatherBack);

    spouseNext = new Button(FontAwesome.ARROW_RIGHT);
    spouseNext.setWidth("100%");
    spouseNext.addClickListener(new ClickListener() {
        private static final long serialVersionUID = 1L;

        @Override
        public void buttonClick(ClickEvent event) {
            setSelectedTab(spouseGroup);
        }
    });
    buttonLayout.addComponents(spouseNext);
}