List of usage examples for com.vaadin.server FontAwesome MALE
FontAwesome MALE
To view the source code for com.vaadin.server FontAwesome MALE.
Click Source Link
From source file:com.ies.schoolos.ui.mobile.info.layout.PersonalLayout.java
private void fatherGroup() { fatherGroup = new VerticalComponentGroup(); fatherGroup.setSizeUndefined();//from w w w . java 2 s . c o m addTab(fatherGroup, "", FontAwesome.MALE); fPeopleIdType = new OptionGroup("", new PeopleIdType()); fPeopleIdType.setItemCaptionPropertyId("name"); fPeopleIdType.setImmediate(true); fPeopleIdType.setNullSelectionAllowed(false); fPeopleIdType.setWidth("-1px"); fPeopleIdType.setHeight("-1px"); fatherGroup.addComponent(fPeopleIdType); fPeopleid = new TextField(""); fPeopleid.setInputPrompt(""); fPeopleid.setImmediate(false); fPeopleid.setWidth("-1px"); fPeopleid.setHeight("-1px"); fPeopleid.setNullRepresentation(""); fPeopleid.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)); fatherBinder.setItemDataSource(item); pkStore[0] = item.getItemProperty(FamilySchema.FAMILY_ID).getValue(); fatherBinder.setEnabled(false); isDuplicateFather = true; } fSqlContainer.removeAllContainerFilters(); } } } }); fatherGroup.addComponent(fPeopleid); fPrename = new NativeSelect("", new Prename()); //fPrename.setInputPrompt("??"); fPrename.setValue(""); fPrename.setItemCaptionPropertyId("name"); fPrename.setImmediate(true); fPrename.setNullSelectionAllowed(false); fPrename.setRequired(true); fPrename.setWidth("-1px"); fPrename.setHeight("-1px"); //fPrename.setFilteringMode(FilteringMode.CONTAINS); fatherGroup.addComponent(fPrename); fFirstname = new TextField(""); fFirstname.setInputPrompt(""); fFirstname.setImmediate(false); fFirstname.setRequired(true); fFirstname.setWidth("-1px"); fFirstname.setHeight("-1px"); fFirstname.setNullRepresentation(""); fatherGroup.addComponent(fFirstname); fLastname = new TextField("?"); fLastname.setInputPrompt("?"); fLastname.setImmediate(false); fLastname.setRequired(true); fLastname.setWidth("-1px"); fLastname.setHeight("-1px"); fLastname.setNullRepresentation(""); fatherGroup.addComponent(fLastname); fFirstnameNd = new TextField("?"); fFirstnameNd.setInputPrompt("?"); fFirstnameNd.setImmediate(false); fFirstnameNd.setWidth("-1px"); fFirstnameNd.setHeight("-1px"); fFirstnameNd.setNullRepresentation(""); fatherGroup.addComponent(fFirstnameNd); fLastnameNd = new TextField("??"); fLastnameNd.setInputPrompt("??"); fLastnameNd.setImmediate(false); fLastnameNd.setWidth("-1px"); fLastnameNd.setHeight("-1px"); fLastnameNd.setNullRepresentation(""); fatherGroup.addComponent(fLastnameNd); fGender = new OptionGroup("", new Gender()); fGender.setItemCaptionPropertyId("name"); fGender.setImmediate(true); fGender.setNullSelectionAllowed(false); fGender.setRequired(true); fGender.setWidth("-1px"); fGender.setHeight("-1px"); fatherGroup.addComponent(fGender); fReligion = new NativeSelect("", new Religion()); //fReligion.setInputPrompt("??"); fReligion.setItemCaptionPropertyId("name"); fReligion.setImmediate(true); fReligion.setNullSelectionAllowed(false); fReligion.setRequired(true); fReligion.setWidth("-1px"); fReligion.setHeight("-1px"); //fReligion.setFilteringMode(FilteringMode.CONTAINS); fatherGroup.addComponent(fReligion); fRace = new NativeSelect("", new Race()); //fRace.setInputPrompt("??"); fRace.setItemCaptionPropertyId("name"); fRace.setImmediate(true); fRace.setNullSelectionAllowed(false); fRace.setRequired(true); fRace.setWidth("-1px"); fRace.setHeight("-1px"); //fRace.setFilteringMode(FilteringMode.CONTAINS); fatherGroup.addComponent(fRace); fNationality = new NativeSelect("?", new Nationality()); //fNationality.setInputPrompt("??"); fNationality.setItemCaptionPropertyId("name"); fNationality.setImmediate(true); fNationality.setNullSelectionAllowed(false); fNationality.setRequired(true); fNationality.setWidth("-1px"); fNationality.setHeight("-1px"); //fNationality.setFilteringMode(FilteringMode.CONTAINS); fatherGroup.addComponent(fNationality); fBirthDate = new PopupDateField(" ?"); fBirthDate.setInputPrompt("//"); fBirthDate.setImmediate(false); fBirthDate.setWidth("-1px"); fBirthDate.setHeight("-1px"); fBirthDate.setDateFormat("dd/MM/yyyy"); fBirthDate.setLocale(new Locale("th", "TH")); fatherGroup.addComponent(fBirthDate); fTel = new TextField(""); fTel.setInputPrompt(""); fTel.setImmediate(false); fTel.setWidth("-1px"); fTel.setHeight("-1px"); fTel.setNullRepresentation(""); fatherGroup.addComponent(fTel); fMobile = new TextField(""); fMobile.setInputPrompt(""); fMobile.setImmediate(false); fMobile.setWidth("-1px"); fMobile.setHeight("-1px"); fMobile.setNullRepresentation(""); fatherGroup.addComponent(fMobile); fEmail = new TextField(""); fEmail.setInputPrompt(""); fEmail.setImmediate(false); fEmail.setWidth("-1px"); fEmail.setHeight("-1px"); fEmail.setNullRepresentation(""); fEmail.addValidator(new EmailValidator("?")); fatherGroup.addComponent(fEmail); fSalary = new NumberField(""); fSalary.setInputPrompt(""); fSalary.setImmediate(false); fSalary.setWidth("-1px"); fSalary.setHeight("-1px"); fSalary.setNullRepresentation(""); fatherGroup.addComponent(fSalary); fAliveStatus = new NativeSelect("", new AliveStatus()); //fAliveStatus.setInputPrompt("??"); fAliveStatus.setItemCaptionPropertyId("name"); fAliveStatus.setImmediate(true); fAliveStatus.setNullSelectionAllowed(false); fAliveStatus.setRequired(true); fAliveStatus.setWidth("-1px"); fAliveStatus.setHeight("-1px"); //fAliveStatus.setFilteringMode(FilteringMode.CONTAINS); fatherGroup.addComponent(fAliveStatus); fOccupation = new NativeSelect("", new Occupation()); //fOccupation.setInputPrompt("??"); fOccupation.setItemCaptionPropertyId("name"); fOccupation.setImmediate(true); fOccupation.setNullSelectionAllowed(false); fOccupation.setRequired(true); fOccupation.setWidth("-1px"); fOccupation.setHeight("-1px"); //fOccupation.setFilteringMode(FilteringMode.CONTAINS); fatherGroup.addComponent(fOccupation); fJobAddress = new TextArea(""); fJobAddress.setInputPrompt(" "); fJobAddress.setImmediate(false); fJobAddress.setWidth("-1px"); fJobAddress.setHeight("-1px"); fJobAddress.setNullRepresentation(""); fatherGroup.addComponent(fJobAddress); fCurrentAddress = new TextArea(""); fCurrentAddress.setInputPrompt(" "); fCurrentAddress.setImmediate(false); fCurrentAddress.setWidth("-1px"); fCurrentAddress.setHeight("-1px"); fCurrentAddress.setNullRepresentation(""); fatherGroup.addComponent(fCurrentAddress); fCurrentProvinceId = new NativeSelect("", new Province()); //fCurrentProvinceId.setInputPrompt("??"); fCurrentProvinceId.setItemCaptionPropertyId("name"); fCurrentProvinceId.setImmediate(true); fCurrentProvinceId.setNullSelectionAllowed(false); fCurrentProvinceId.setWidth("-1px"); fCurrentProvinceId.setHeight("-1px"); //fCurrentProvinceId.setFilteringMode(FilteringMode.CONTAINS); fCurrentProvinceId.addValueChangeListener(new ValueChangeListener() { private static final long serialVersionUID = 1L; @Override public void valueChange(ValueChangeEvent event) { if (event.getProperty().getValue() != null) fCurrentDistrict.setContainerDataSource( new District(Integer.parseInt(event.getProperty().getValue().toString()))); } }); fatherGroup.addComponent(fCurrentProvinceId); fCurrentDistrict = new NativeSelect(""); //fCurrentDistrict.setInputPrompt("??"); fCurrentDistrict.setItemCaptionPropertyId("name"); fCurrentDistrict.setImmediate(true); fCurrentDistrict.setNullSelectionAllowed(false); fCurrentDistrict.setWidth("-1px"); fCurrentDistrict.setHeight("-1px"); //fCurrentDistrict.setFilteringMode(FilteringMode.CONTAINS); fCurrentDistrict.addValueChangeListener(new ValueChangeListener() { private static final long serialVersionUID = 1L; @Override public void valueChange(ValueChangeEvent event) { if (event.getProperty().getValue() != null) { fCurrentCity.setContainerDataSource( new City(Integer.parseInt(event.getProperty().getValue().toString()))); fCurrentPostcode.setContainerDataSource( new Postcode(Integer.parseInt(event.getProperty().getValue().toString()))); } } }); fatherGroup.addComponent(fCurrentDistrict); fCurrentCity = new NativeSelect(""); //fCurrentCity.setInputPrompt("??"); fCurrentCity.setItemCaptionPropertyId("name"); fCurrentCity.setImmediate(true); fCurrentCity.setNullSelectionAllowed(false); fCurrentCity.setWidth("-1px"); fCurrentCity.setHeight("-1px"); //fCurrentCity.setFilteringMode(FilteringMode.CONTAINS); fatherGroup.addComponent(fCurrentCity); fCurrentPostcode = new NativeSelect(""); //fCurrentPostcode.setInputPrompt("??"); fCurrentPostcode.setItemCaptionPropertyId("name"); fCurrentPostcode.setImmediate(true); fCurrentPostcode.setNullSelectionAllowed(false); fCurrentPostcode.setWidth("-1px"); fCurrentPostcode.setHeight("-1px"); //fCurrentPostcode.setFilteringMode(FilteringMode.CONTAINS); fatherGroup.addComponent(fCurrentPostcode); HorizontalLayout buttonLayout = new HorizontalLayout(); buttonLayout.setSpacing(true); buttonLayout.setWidth("100%"); fatherGroup.addComponent(buttonLayout); addressBack = new Button(FontAwesome.ARROW_LEFT); addressBack.setWidth("100%"); addressBack.addClickListener(new ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(ClickEvent event) { setSelectedTab(addressGroup); } }); buttonLayout.addComponents(addressBack); motherNext = new Button(FontAwesome.ARROW_RIGHT); motherNext.setWidth("100%"); motherNext.addClickListener(new ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(ClickEvent event) { setSelectedTab(motherGroup); } }); buttonLayout.addComponents(motherNext); }