List of usage examples for com.vaadin.ui HorizontalLayout HorizontalLayout
public HorizontalLayout()
From source file:com.haulmont.cuba.web.widgets.CubaRowsCount.java
License:Apache License
public CubaRowsCount() { HorizontalLayout layout = new HorizontalLayout(); // vaadin8 use CssLayout instead layout.setStyleName("c-paging"); layout.setSpacing(false);//from ww w . j a va2 s .c o m layout.setMargin(new MarginInfo(false, false, false, true)); setCompositionRoot(layout); CubaPlaceHolder expander = new CubaPlaceHolder(); expander.setWidth("100%"); layout.addComponent(expander); layout.setExpandRatio(expander, 1); AbstractOrderedLayout contentLayout = createContentLayout(); layout.addComponent(contentLayout); layout.setWidth("100%"); setWidth("100%"); }
From source file:com.haulmont.cuba.web.widgets.CubaRowsCount.java
License:Apache License
protected AbstractOrderedLayout createContentLayout() { HorizontalLayout contentLayout = new HorizontalLayout(); // vaadin8 use CssLayout instead contentLayout.setStyleName("c-paging-wrap"); contentLayout.setSpacing(true);/*from w w w .ja va2 s. com*/ contentLayout.setMargin(false); firstButton = new CubaButton(); firstButton.setStyleName("c-paging-change-page"); firstButton.addStyleName("c-paging-first"); contentLayout.addComponent(firstButton); contentLayout.setComponentAlignment(firstButton, Alignment.MIDDLE_CENTER); prevButton = new CubaButton(); prevButton.setStyleName("c-paging-change-page"); prevButton.addStyleName("c-paging-prev"); contentLayout.addComponent(prevButton); contentLayout.setComponentAlignment(prevButton, Alignment.MIDDLE_CENTER); label = new Label(); label.setWidthUndefined(); label.setStyleName("c-paging-status"); contentLayout.addComponent(label); contentLayout.setComponentAlignment(label, Alignment.MIDDLE_CENTER); countButton = new CubaButton("[?]"); countButton.setWidthUndefined(); countButton.setStyleName(ValoTheme.BUTTON_LINK); countButton.addStyleName("c-paging-count"); countButton.setTabIndex(-1); contentLayout.addComponent(countButton); contentLayout.setComponentAlignment(countButton, Alignment.MIDDLE_CENTER); nextButton = new CubaButton(); nextButton.setStyleName("c-paging-change-page"); nextButton.addStyleName("c-paging-next"); contentLayout.addComponent(nextButton); contentLayout.setComponentAlignment(nextButton, Alignment.MIDDLE_CENTER); lastButton = new CubaButton(); lastButton.setStyleName("c-paging-change-page"); lastButton.addStyleName("c-paging-last"); contentLayout.addComponent(lastButton); contentLayout.setComponentAlignment(lastButton, Alignment.MIDDLE_CENTER); return contentLayout; }
From source file:com.hivesys.dashboard.view.preferences.PreferencesView.java
License:Apache License
public PreferencesView() { user = (User) VaadinSession.getCurrent().getAttribute(User.class.getName()); setSpacing(true);// ww w. j ava 2 s . c om setMargin(true); Label title = new Label("Forms"); title.addStyleName("h1"); addComponent(title); final FormLayout form = new FormLayout(); form.setMargin(false); form.setWidth("800px"); form.addStyleName("light"); addComponent(form); Label section = new Label("Personal Info"); section.addStyleName("h2"); section.addStyleName("colored"); form.addComponent(section); firstNameField = new TextField("First Name"); firstNameField.setWidth("50%"); form.addComponent(firstNameField); lastNameField = new TextField("Last Name"); lastNameField.setWidth("50%"); form.addComponent(lastNameField); titleField = new ComboBox("Title"); titleField.setInputPrompt("Please specify"); titleField.addItem("Mr."); titleField.addItem("Mrs."); titleField.addItem("Ms."); titleField.setNewItemsAllowed(true); form.addComponent(titleField); usernameField = new TextField("Username"); usernameField.setRequired(true); form.addComponent(usernameField); sexField = new OptionGroup("Sex"); sexField.addItem(Boolean.FALSE); sexField.setItemCaption(Boolean.FALSE, "Female"); sexField.addItem(Boolean.TRUE); sexField.setItemCaption(Boolean.TRUE, "Male"); sexField.addStyleName("horizontal"); form.addComponent(sexField); section = new Label("Contact Info"); section.addStyleName("h3"); section.addStyleName("colored"); form.addComponent(section); emailField = new TextField("Email"); emailField.setWidth("50%"); emailField.setRequired(true); form.addComponent(emailField); locationField = new TextField("Location"); locationField.setWidth("50%"); locationField.setNullRepresentation(""); form.addComponent(locationField); phoneField = new TextField("Phone"); phoneField.setWidth("50%"); phoneField.setNullRepresentation(""); form.addComponent(phoneField); section = new Label("Additional Info"); section.addStyleName("h4"); section.addStyleName("colored"); form.addComponent(section); websiteField = new TextField("Website"); websiteField.setInputPrompt("http://"); websiteField.setWidth("100%"); form.addComponent(websiteField); bioField = new RichTextArea("Bio"); bioField.setWidth("100%"); bioField.setValue( "<div><p><span>Integer legentibus erat a ante historiarum dapibus.</span> <span>Vivamus sagittis lacus vel augue laoreet rutrum faucibus.</span> <span>A communi observantia non est recedendum.</span> <span>Morbi fringilla convallis sapien, id pulvinar odio volutpat.</span> <span>Ab illo tempore, ab est sed immemorabili.</span> <span>Quam temere in vitiis, legem sancimus haerentia.</span></p><p><span>Morbi odio eros, volutpat ut pharetra vitae, lobortis sed nibh.</span> <span>Quam diu etiam furor iste tuus nos eludet?</span> <span>Cum sociis natoque penatibus et magnis dis parturient.</span> <span>Quam diu etiam furor iste tuus nos eludet?</span> <span>Tityre, tu patulae recubans sub tegmine fagi dolor.</span></p><p><span>Curabitur blandit tempus ardua ridiculus sed magna.</span> <span>Phasellus laoreet lorem vel dolor tempus vehicula.</span> <span>Etiam habebis sem dicantur magna mollis euismod.</span> <span>Hi omnes lingua, institutis, legibus inter se differunt.</span></p></div>"); form.addComponent(bioField); Button edit = new Button("Edit", new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { boolean readOnly = form.isReadOnly(); if (readOnly) { bioField.setReadOnly(false); form.setReadOnly(false); form.removeStyleName("light"); event.getButton().setCaption("Save"); event.getButton().addStyleName("primary"); } else { bioField.setReadOnly(true); form.setReadOnly(true); form.addStyleName("light"); event.getButton().setCaption("Edit"); event.getButton().removeStyleName("primary"); } } }); HorizontalLayout footer = new HorizontalLayout(); footer.setMargin(new MarginInfo(true, false, true, false)); footer.setSpacing(true); footer.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT); form.addComponent(footer); footer.addComponent(edit); Label lastModified = new Label("Last modified by you a minute ago"); lastModified.addStyleName("light"); footer.addComponent(lastModified); fieldGroup = new BeanFieldGroup<>(User.class); fieldGroup.bindMemberFields(this); fieldGroup.setItemDataSource(user); form.setReadOnly(true); bioField.setReadOnly(true); }
From source file:com.hris.payroll.alphalist.AlphaListMainUI.java
public AlphaListMainUI(int branchId) { this.branchId = branchId; setSizeFull();// w ww .j av a 2 s . c o m setMargin(new MarginInfo(true, true, false, true)); setSpacing(true); HorizontalLayout h1 = new HorizontalLayout(); h1.setCaption("Year: "); h1.setWidthUndefined(); h1.setSpacing(true); h1.addComponent(employmentStatus); h1.addComponent(selectYear()); h1.addComponent(alphaListButton()); h1.addComponent(exportToExcelButton()); addComponent(h1); HorizontalLayout h2 = new HorizontalLayout(); h2.setWidthUndefined(); h2.setSpacing(true); progress.setWidth("410px"); h2.addComponent(progress); h2.setComponentAlignment(progress, Alignment.MIDDLE_LEFT); status.setValue("0%"); h2.addComponent(status); processLabel.setValue(""); h2.addComponent(processLabel); addComponent(h2); addComponent(grid); setExpandRatio(grid, 3); }
From source file:com.hris.payroll.reports.ReportUI.java
public ReportUI(int branchId) { this.branchId = branchId; setSizeFull();// ww w .ja va 2 s. co m setMargin(new MarginInfo(true, true, false, true)); setSpacing(true); HorizontalLayout h1 = new HorizontalLayout(); h1.setWidthUndefined(); h1.setSpacing(true); h1.addComponent(reportType); h1.addComponent(payrollDateField()); h1.addComponent(viewReportBtn()); addComponent(h1); addComponent(grid); setExpandRatio(grid, 2); HorizontalLayout h2 = new HorizontalLayout(); h2.setWidthUndefined(); h2.setSpacing(true); }
From source file:com.hris.payroll.thirteenthmonth.ThirteenthMonth.java
public ThirteenthMonth(int branchId) { this.branchId = branchId; setSizeFull();//w w w. ja v a 2 s .c o m setMargin(new MarginInfo(true, true, false, true)); setSpacing(true); HorizontalLayout h1 = new HorizontalLayout(); h1.setWidthUndefined(); h1.setSpacing(true); h1.addComponent(employmentStatus); h1.addComponent(selectYear()); h1.addComponent(generate13thMonth()); h1.addComponent(exportToExcelButton()); addComponent(h1); HorizontalLayout h2 = new HorizontalLayout(); h2.setWidthUndefined(); h2.setSpacing(true); progress.setWidth("410px"); h2.addComponent(progress); h2.setComponentAlignment(progress, Alignment.MIDDLE_LEFT); status.setValue("0%"); h2.addComponent(status); grid = new ThirteenthMonthDataGridProperty(); addComponent(h2); addComponent(grid); setExpandRatio(grid, 3); }
From source file:com.hybridbpm.ui.component.dashboard.panel.DashboardPanel.java
License:Apache License
public DashboardPanel(DashboardTab panelView, PanelDefinition pd) { this.dashboardTab = panelView; this.panelDefinition = pd; toolbar = new HorizontalLayout(); toolbar.setMargin(new MarginInfo(false, false, false, true)); toolbar.setWidth(99, Unit.PERCENTAGE); toolbar.setStyleName(HybridbpmStyle.LAYOUT_PADDING8); caption.addStyleName(ValoTheme.LABEL_H4); caption.addStyleName(ValoTheme.LABEL_COLORED); caption.addStyleName(ValoTheme.LABEL_NO_MARGIN); toolbar.removeAllComponents();// w w w . j a v a 2s . c om toolbar.addComponents(caption, new PanelMenuBar(this)); toolbar.setExpandRatio(caption, 1); toolbar.setComponentAlignment(caption, Alignment.MIDDLE_LEFT); setSizeFull(); setStyleName(ValoTheme.LAYOUT_CARD); addStyleName("dashboard-panel"); configureModule(); }
From source file:com.ies.schoolos.ui.mobile.info.layout.PersonalLayout.java
private void generalInfoLayout() { generalGroup = new VerticalComponentGroup(); generalGroup.setSizeUndefined();/* w ww . j a v a 2 s . c om*/ addTab(generalGroup, "", FontAwesome.CHILD); peopleIdType = new OptionGroup("", new PeopleIdType()); peopleIdType.setItemCaptionPropertyId("name"); peopleIdType.setImmediate(true); peopleIdType.setRequired(true); peopleIdType.setNullSelectionAllowed(false); peopleIdType.setWidth("-1px"); peopleIdType.setHeight("-1px"); generalGroup.addComponent(peopleIdType); peopleId = new TextField(""); peopleId.setInputPrompt(""); peopleId.setImmediate(false); peopleId.setRequired(true); peopleId.setWidth("-1px"); peopleId.setHeight("-1px"); peopleId.setNullRepresentation(""); peopleId.addValidator( new StringLengthValidator("?", 13, 20, false)); peopleId.addTextChangeListener(new TextChangeListener() { private static final long serialVersionUID = 1L; @Override public void textChange(TextChangeEvent event) { if (event.getText() != null) { if (event.getText().length() >= 13) { pSqlContainer.addContainerFilter(new Equal(PersonnelSchema.PEOPLE_ID, event.getText())); if (pSqlContainer.size() > 0) { disableDuplicatePeopleIdForm(); Notification.show( "?? ??", Type.WARNING_MESSAGE); } else { enableDuplicatePeopleIdForm(); } pSqlContainer.removeAllContainerFilters(); } } } }); generalGroup.addComponent(peopleId); prename = new NativeSelect("", new Prename()); //prename.setInputPrompt("??"); prename.setItemCaptionPropertyId("name"); prename.setImmediate(true); prename.setNullSelectionAllowed(false); prename.setRequired(true); prename.setWidth("-1px"); prename.setHeight("-1px"); //prename.setFilteringMode(FilteringMode.CONTAINS); generalGroup.addComponent(prename); firstname = new TextField(""); firstname.setInputPrompt(""); firstname.setImmediate(false); firstname.setRequired(true); firstname.setWidth("-1px"); firstname.setHeight("-1px"); firstname.setNullRepresentation(""); generalGroup.addComponent(firstname); lastname = new TextField("?"); lastname.setInputPrompt("?"); lastname.setImmediate(false); lastname.setRequired(true); lastname.setWidth("-1px"); lastname.setHeight("-1px"); lastname.setNullRepresentation(""); generalGroup.addComponent(lastname); firstnameNd = new TextField("?"); firstnameNd.setInputPrompt("?"); firstnameNd.setImmediate(false); firstnameNd.setWidth("-1px"); firstnameNd.setHeight("-1px"); firstnameNd.setNullRepresentation(""); generalGroup.addComponent(firstnameNd); lastnameNd = new TextField("??"); lastnameNd.setInputPrompt("??"); lastnameNd.setImmediate(false); lastnameNd.setWidth("-1px"); lastnameNd.setHeight("-1px"); lastnameNd.setNullRepresentation(""); generalGroup.addComponent(lastnameNd); firstnameRd = new TextField(""); firstnameRd.setInputPrompt(""); firstnameRd.setImmediate(false); firstnameRd.setWidth("-1px"); firstnameRd.setHeight("-1px"); firstnameRd.setNullRepresentation(""); generalGroup.addComponent(firstnameRd); lastnameRd = new TextField("?"); lastnameRd.setInputPrompt("?"); lastnameRd.setImmediate(false); lastnameRd.setWidth("-1px"); lastnameRd.setHeight("-1px"); lastnameRd.setNullRepresentation(""); generalGroup.addComponent(lastnameRd); nickname = new TextField(""); nickname.setInputPrompt(""); nickname.setImmediate(false); nickname.setWidth("-1px"); nickname.setHeight("-1px"); nickname.setNullRepresentation(""); generalGroup.addComponent(nickname); gender = new OptionGroup("", new Gender()); gender.setItemCaptionPropertyId("name"); gender.setImmediate(true); gender.setNullSelectionAllowed(false); gender.setRequired(true); gender.setWidth("-1px"); gender.setHeight("-1px"); generalGroup.addComponent(gender); religion = new NativeSelect("", new Religion()); //religion.setInputPrompt("??"); religion.setItemCaptionPropertyId("name"); religion.setImmediate(true); religion.setNullSelectionAllowed(false); religion.setRequired(true); religion.setWidth("-1px"); religion.setHeight("-1px"); //religion.setFilteringMode(FilteringMode.CONTAINS); generalGroup.addComponent(religion); race = new NativeSelect("", new Race()); //race.setInputPrompt("??"); race.setItemCaptionPropertyId("name"); race.setImmediate(true); race.setNullSelectionAllowed(false); race.setRequired(true); race.setWidth("-1px"); race.setHeight("-1px"); //race.setFilteringMode(FilteringMode.CONTAINS); generalGroup.addComponent(race); nationality = new NativeSelect("?", new Nationality()); //nationality.setInputPrompt("??"); nationality.setItemCaptionPropertyId("name"); nationality.setImmediate(true); nationality.setNullSelectionAllowed(false); nationality.setRequired(true); nationality.setWidth("-1px"); nationality.setHeight("-1px"); //nationality.setFilteringMode(FilteringMode.CONTAINS); generalGroup.addComponent(nationality); maritalStatus = new NativeSelect("", new MaritalStatus()); //maritalStatus.setInputPrompt("??"); maritalStatus.setItemCaptionPropertyId("name"); maritalStatus.setImmediate(true); maritalStatus.setNullSelectionAllowed(false); maritalStatus.setRequired(true); maritalStatus.setWidth("-1px"); maritalStatus.setHeight("-1px"); //maritalStatus.setFilteringMode(FilteringMode.CONTAINS); generalGroup.addComponent(maritalStatus); aliveStatus = new NativeSelect("?", new AliveStatus()); //aliveStatus.setInputPrompt("??"); aliveStatus.setItemCaptionPropertyId("name"); aliveStatus.setImmediate(true); aliveStatus.setNullSelectionAllowed(false); aliveStatus.setRequired(true); aliveStatus.setWidth("-1px"); aliveStatus.setHeight("-1px"); //aliveStatus.setFilteringMode(FilteringMode.CONTAINS); aliveStatus.setVisible(false); generalGroup.addComponent(aliveStatus); birthDate = new PopupDateField(" ?"); birthDate.setInputPrompt("//"); birthDate.setImmediate(false); birthDate.setRequired(true); birthDate.setWidth("-1px"); birthDate.setHeight("-1px"); birthDate.setDateFormat("dd/MM/yyyy"); birthDate.setLocale(new Locale("th", "TH")); generalGroup.addComponent(birthDate); blood = new NativeSelect("", new Blood()); //blood.setInputPrompt("??"); blood.setItemCaptionPropertyId("name"); blood.setImmediate(true); blood.setNullSelectionAllowed(false); blood.setRequired(true); blood.setWidth("-1px"); blood.setHeight("-1px"); //blood.setFilteringMode(FilteringMode.CONTAINS); generalGroup.addComponent(blood); height = new NumberField(""); height.setInputPrompt(""); height.setImmediate(false); height.setWidth("-1px"); height.setHeight("-1px"); height.setNullRepresentation(""); generalGroup.addComponent(height); weight = new NumberField("?"); weight.setInputPrompt("?"); weight.setImmediate(false); weight.setWidth("-1px"); weight.setHeight("-1px"); weight.setNullRepresentation(""); generalGroup.addComponent(weight); congenitalDisease = new TextField(""); congenitalDisease.setInputPrompt(""); congenitalDisease.setImmediate(false); congenitalDisease.setWidth("-1px"); congenitalDisease.setHeight("-1px"); congenitalDisease.setNullRepresentation(""); generalGroup.addComponent(congenitalDisease); HorizontalLayout buttonLayout = new HorizontalLayout(); buttonLayout.setSpacing(true); buttonLayout.setWidth("100%"); generalGroup.addComponent(buttonLayout); workNext = new Button(FontAwesome.ARROW_RIGHT); workNext.setWidth("100%"); workNext.addClickListener(new ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(ClickEvent event) { setSelectedTab(workGroup); } }); buttonLayout.addComponent(workNext); }
From source file:com.ies.schoolos.ui.mobile.info.layout.PersonalLayout.java
private void workGroup() { workGroup = new VerticalComponentGroup(); workGroup.setSizeUndefined();/*from www. j a va 2 s. c om*/ addTab(workGroup, "?", FontAwesome.GRADUATION_CAP); jobPosition = new NativeSelect("?", new JobPosition()); //jobPosition.setInputPrompt("??"); jobPosition.setItemCaptionPropertyId("name"); jobPosition.setImmediate(true); jobPosition.setNullSelectionAllowed(false); jobPosition.setRequired(true); jobPosition.setWidth("-1px"); jobPosition.setHeight("-1px"); //jobPosition.setFilteringMode(FilteringMode.CONTAINS); jobPosition.addValueChangeListener(new ValueChangeListener() { private static final long serialVersionUID = 1L; @Override public void valueChange(ValueChangeEvent event) { if (event.getProperty().getValue() != null) { if (autoGenerate.getValue() != null) { String personnelCodeStr = getPersonnelCode(event.getProperty().getValue().toString(), autoGenerate.getValue().toString()); personnelCode.setEnabled(true); personnelCode.setValue(personnelCodeStr + TEMP_TITLE); personnelCode.setEnabled(false); } } } }); workGroup.addComponent(jobPosition); autoGenerate = new OptionGroup("?", new PersonnelCodeGenerateType()); autoGenerate.setItemCaptionPropertyId("name"); autoGenerate.setImmediate(true); autoGenerate.setRequired(true); autoGenerate.setNullSelectionAllowed(false); autoGenerate.setWidth("-1px"); autoGenerate.setHeight("-1px"); //autoGenerate.setValue(1); autoGenerate.addValueChangeListener(new ValueChangeListener() { private static final long serialVersionUID = 1L; @Override public void valueChange(ValueChangeEvent event) { if (event.getProperty().getValue() != null) { if (event.getProperty().getValue().toString().equals("0")) { if (jobPosition.getValue() != null) { String personnelCodeStr = getPersonnelCode(jobPosition.getValue().toString(), event.getProperty().getValue().toString()); personnelCode.setEnabled(true); personnelCode.setValue(personnelCodeStr + TEMP_TITLE); personnelCode.setEnabled(false); } else if (event.getProperty().getValue().equals("0")) Notification.show( "??", Type.WARNING_MESSAGE); } else { personnelCode.setEnabled(true); personnelCode.setValue(getPersonnelCode(null, "1")); } } } }); workGroup.addComponent(autoGenerate); personnelCode = new TextField(""); personnelCode.setInputPrompt(""); personnelCode.setImmediate(false); personnelCode.setRequired(true); personnelCode.setEnabled(false); personnelCode.setWidth("-1px"); personnelCode.setHeight("-1px"); personnelCode.setNullRepresentation(""); workGroup.addComponent(personnelCode); personnelStatus = new NativeSelect("?", new PersonnelStatus()); //personnelStatus.setInputPrompt("??"); personnelStatus.setItemCaptionPropertyId("name"); personnelStatus.setImmediate(true); personnelStatus.setNullSelectionAllowed(false); personnelStatus.setRequired(true); personnelStatus.setWidth("-1px"); personnelStatus.setHeight("-1px"); //personnelStatus.setFilteringMode(FilteringMode.CONTAINS); workGroup.addComponent(personnelStatus); startWorkDate = new PopupDateField(" "); startWorkDate.setInputPrompt("//"); startWorkDate.setImmediate(false); startWorkDate.setRequired(true); startWorkDate.setWidth("-1px"); startWorkDate.setHeight("-1px"); startWorkDate.setDateFormat("dd/MM/yyyy"); startWorkDate.setLocale(new Locale("th", "TH")); workGroup.addComponent(startWorkDate); department = new NativeSelect("??", new Department()); //department.setInputPrompt("??"); department.setItemCaptionPropertyId("name"); department.setImmediate(true); department.setNullSelectionAllowed(false); department.setRequired(true); department.setWidth("-1px"); department.setHeight("-1px"); //department.setFilteringMode(FilteringMode.CONTAINS); workGroup.addComponent(department); employmentType = new NativeSelect("?", new EmploymentType()); //employmentType.setInputPrompt("??"); employmentType.setItemCaptionPropertyId("name"); employmentType.setImmediate(true); employmentType.setNullSelectionAllowed(false); employmentType.setRequired(true); employmentType.setWidth("-1px"); employmentType.setHeight("-1px"); //employmentType.setFilteringMode(FilteringMode.CONTAINS); workGroup.addComponent(employmentType); bankaccountName = new TextField("?"); bankaccountName.setInputPrompt("?"); bankaccountName.setImmediate(false); bankaccountName.setWidth("-1px"); bankaccountName.setHeight("-1px"); bankaccountName.setNullRepresentation(""); workGroup.addComponent(bankaccountName); bankAccountNumber = new TextField("?"); bankAccountNumber.setInputPrompt("?"); bankAccountNumber.setImmediate(false); bankAccountNumber.setWidth("-1px"); bankAccountNumber.setHeight("-1px"); bankAccountNumber.setNullRepresentation(""); workGroup.addComponent(bankAccountNumber); bankAccountType = new NativeSelect("?", new BankAccountType()); //bankAccountType.setInputPrompt("??"); bankAccountType.setItemCaptionPropertyId("name"); bankAccountType.setImmediate(true); bankAccountType.setNullSelectionAllowed(false); bankAccountType.setWidth("-1px"); bankAccountType.setHeight("-1px"); //bankAccountType.setFilteringMode(FilteringMode.CONTAINS); workGroup.addComponent(bankAccountType); bankName = new TextField(""); bankName.setInputPrompt(""); bankName.setImmediate(false); bankName.setWidth("-1px"); bankName.setHeight("-1px"); bankName.setNullRepresentation(""); workGroup.addComponent(bankName); bankaccountBranch = new TextField(""); bankaccountBranch.setInputPrompt(""); bankaccountBranch.setImmediate(false); bankaccountBranch.setWidth("-1px"); bankaccountBranch.setHeight("-1px"); bankaccountBranch.setNullRepresentation(""); workGroup.addComponent(bankaccountBranch); bankProvinceId = new NativeSelect("", new Province()); //bankProvinceId.setInputPrompt("??"); bankProvinceId.setItemCaptionPropertyId("name"); bankProvinceId.setImmediate(true); bankProvinceId.setNullSelectionAllowed(false); bankProvinceId.setWidth("-1px"); bankProvinceId.setHeight("-1px"); //bankProvinceId.setFilteringMode(FilteringMode.CONTAINS); bankProvinceId.addValueChangeListener(new ValueChangeListener() { private static final long serialVersionUID = 1L; @Override public void valueChange(ValueChangeEvent event) { if (event.getProperty().getValue() != null) currentDistrict.setContainerDataSource( new District(Integer.parseInt(event.getProperty().getValue().toString()))); } }); workGroup.addComponent(bankProvinceId); HorizontalLayout buttonLayout = new HorizontalLayout(); buttonLayout.setWidth("100%"); buttonLayout.setSpacing(true); workGroup.addComponent(buttonLayout); generalBack = new Button(FontAwesome.ARROW_LEFT); generalBack.setWidth("100%"); generalBack.addClickListener(new ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(ClickEvent event) { setSelectedTab(generalGroup); } }); buttonLayout.addComponents(generalBack); licenseeNext = new Button(FontAwesome.ARROW_RIGHT); licenseeNext.setWidth("100%"); licenseeNext.addClickListener(new ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(ClickEvent event) { setSelectedTab(licenseeGroup); } }); buttonLayout.addComponents(licenseeNext); }
From source file:com.ies.schoolos.ui.mobile.info.layout.PersonalLayout.java
private void licenseeGroup() { licenseeGroup = new VerticalComponentGroup(); licenseeGroup.setSizeUndefined();//from ww w. j ava2 s . c o m addTab(licenseeGroup, "", FontAwesome.BRIEFCASE); licenseLecturerNumber = new TextField(""); licenseLecturerNumber.setInputPrompt(""); licenseLecturerNumber.setImmediate(false); licenseLecturerNumber.setWidth("-1px"); licenseLecturerNumber.setHeight("-1px"); licenseLecturerNumber.setNullRepresentation(""); licenseeGroup.addComponent(licenseLecturerNumber); licenseLecturerType = new NativeSelect("?", new LicenseLecturerType()); //licenseLecturerType.setInputPrompt("??"); licenseLecturerType.setItemCaptionPropertyId("name"); licenseLecturerType.setImmediate(true); licenseLecturerType.setNullSelectionAllowed(false); licenseLecturerType.setWidth("-1px"); licenseLecturerType.setHeight("-1px"); //licenseLecturerType.setFilteringMode(FilteringMode.CONTAINS); licenseeGroup.addComponent(licenseLecturerType); licenseLecturerIssuedDate = new PopupDateField(" ?"); licenseLecturerIssuedDate.setInputPrompt("//"); licenseLecturerIssuedDate.setImmediate(false); licenseLecturerIssuedDate.setWidth("-1px"); licenseLecturerIssuedDate.setHeight("-1px"); licenseLecturerIssuedDate.setDateFormat("dd/MM/yyyy"); licenseLecturerIssuedDate.setLocale(new Locale("th", "TH")); licenseeGroup.addComponent(licenseLecturerIssuedDate); licenseLecturerExpiredDate = new PopupDateField(" "); licenseLecturerExpiredDate.setInputPrompt("//"); licenseLecturerExpiredDate.setImmediate(false); licenseLecturerExpiredDate.setWidth("-1px"); licenseLecturerExpiredDate.setHeight("-1px"); licenseLecturerExpiredDate.setDateFormat("dd/MM/yyyy"); licenseLecturerExpiredDate.setLocale(new Locale("th", "TH")); licenseeGroup.addComponent(licenseLecturerExpiredDate); license11Number = new TextField("? 11"); license11Number.setInputPrompt("? 11"); license11Number.setImmediate(false); license11Number.setWidth("-1px"); license11Number.setHeight("-1px"); license11Number.setNullRepresentation(""); licenseeGroup.addComponent(license11Number); licenseIssueArea = new TextField(" ?"); licenseIssueArea.setInputPrompt(" ?"); licenseIssueArea.setImmediate(false); licenseIssueArea.setWidth("-1px"); licenseIssueArea.setHeight("-1px"); licenseIssueArea.setNullRepresentation(""); licenseeGroup.addComponent(licenseIssueArea); licenseIssueProvinceId = new NativeSelect("?", new Province()); //licenseIssueProvinceId.setInputPrompt("??"); licenseIssueProvinceId.setItemCaptionPropertyId("name"); licenseIssueProvinceId.setImmediate(true); licenseIssueProvinceId.setNullSelectionAllowed(false); licenseIssueProvinceId.setWidth("-1px"); licenseIssueProvinceId.setHeight("-1px"); //licenseIssueProvinceId.setFilteringMode(FilteringMode.CONTAINS); licenseeGroup.addComponent(bankProvinceId); license17Number = new TextField("? 17"); license17Number.setInputPrompt("? 17"); license17Number.setImmediate(false); license17Number.setWidth("-1px"); license17Number.setHeight("-1px"); license17Number.setNullRepresentation(""); licenseeGroup.addComponent(license17Number); license18Number = new TextField("? 18"); license18Number.setInputPrompt("? 18"); license18Number.setImmediate(false); license18Number.setWidth("-1px"); license18Number.setHeight("-1px"); license18Number.setNullRepresentation(""); licenseeGroup.addComponent(license18Number); license19Number = new TextField("? 19"); license19Number.setInputPrompt("? 19"); license19Number.setImmediate(false); license19Number.setWidth("-1px"); license19Number.setHeight("-1px"); license19Number.setNullRepresentation(""); licenseeGroup.addComponent(license19Number); fillDegreePost = new TextField("?"); fillDegreePost.setInputPrompt("?"); fillDegreePost.setImmediate(false); fillDegreePost.setWidth("-1px"); fillDegreePost.setHeight("-1px"); fillDegreePost.setNullRepresentation(""); licenseeGroup.addComponent(fillDegreePost); fillDegreePostDate = new PopupDateField( " ?"); fillDegreePostDate.setInputPrompt("//"); fillDegreePostDate.setImmediate(false); fillDegreePostDate.setWidth("-1px"); fillDegreePostDate.setHeight("-1px"); fillDegreePostDate.setDateFormat("dd/MM/yyyy"); fillDegreePostDate.setLocale(new Locale("th", "TH")); licenseeGroup.addComponent(fillDegreePostDate); HorizontalLayout buttonLayout = new HorizontalLayout(); buttonLayout.setWidth("100%"); buttonLayout.setSpacing(true); licenseeGroup.addComponent(buttonLayout); workBack = new Button(FontAwesome.ARROW_LEFT); workBack.setWidth("100%"); workBack.addClickListener(new ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(ClickEvent event) { setSelectedTab(workGroup); } }); buttonLayout.addComponents(workBack); addressNext = new Button(FontAwesome.ARROW_RIGHT); addressNext.setWidth("100%"); addressNext.addClickListener(new ClickListener() { private static final long serialVersionUID = 1L; @Override public void buttonClick(ClickEvent event) { setSelectedTab(addressGroup); } }); buttonLayout.addComponents(addressNext); }