List of usage examples for com.vaadin.ui.themes ValoTheme COMBOBOX_SMALL
String COMBOBOX_SMALL
To view the source code for com.vaadin.ui.themes ValoTheme COMBOBOX_SMALL.
Click Source Link
From source file:com.etest.view.tq.reports.OnlineQueriesUI.java
public OnlineQueriesUI() { setWidth("100%"); setMargin(true);/*from w w w. j a v a2s .c om*/ setSpacing(true); Label lineSeparator1 = new Label(); lineSeparator1.setContentMode(ContentMode.HTML); lineSeparator1.setStyleName("line-separator"); Label lineSeparator2 = new Label(); lineSeparator2.setContentMode(ContentMode.HTML); lineSeparator2.setStyleName("line-separator"); disableAllComponents(false); GridLayout topGrid = new GridLayout(3, 2); topGrid.setWidth("800px"); topGrid.setSpacing(true); VerticalLayout top = new VerticalLayout(); top.setWidth("166px"); graphicalInventory.addItem("Graphical Inventory"); graphicalInventory.setWidth("300px"); top.addComponent(graphicalInventory); graphicalInventory.addValueChangeListener(firstLevelOptionListener); graphicalInventory.setImmediate(true); graphicalInventoryGroup.addItem("All Subjects"); Label subjectProportionedCaption = new Label(); subjectProportionedCaption.setWidth("500px"); subjectProportionedCaption .setCaption("A Subject's No. of Items Proportioned " + "According to the Revised Bloom's Taxonomy"); subjectProportionedCaption.setContentMode(ContentMode.HTML); subjectProportionedCaption.setHeightUndefined(); graphicalInventoryGroup.addItem(subjectProportionedCaption.getCaption()); graphicalInventoryGroup.setWidth("400px"); graphicalInventoryGroup.addValueChangeListener(secondLevelTopOptionListener); graphicalInventoryGroup.setImmediate(true); topGrid.addComponent(top, 0, 0); topGrid.addComponent(graphicalInventoryGroup, 1, 0, 2, 0); addComponent(topGrid); searchSubject1.setInputPrompt("Search Subject"); searchSubject1.setWidth("225px"); searchSubject1.addValueChangeListener(dropDownChangeListener); searchSubject1.setEnabled(false); topGrid.addComponent(searchSubject1, 1, 1); addComponent(lineSeparator1); GridLayout bottomGrid = new GridLayout(3, 3); bottomGrid.setWidth("800px"); bottomGrid.setSpacing(true); VerticalLayout bottom = new VerticalLayout(); bottom.setWidth("235px"); itemAnalysis.addItem("Item Analysis"); itemAnalysis.setWidth("310px"); bottom.addComponent(itemAnalysis); itemAnalysis.addValueChangeListener(firstLevelOptionListener); itemAnalysis.setImmediate(true); graphicalView.addItem("Graphical View"); graphicalView.setWidth("210px"); graphicalView.addValueChangeListener(secondLevelBottomOptionListener); graphicalView.setImmediate(true); tabularView.addItem("Tabular View"); tabularView.addValueChangeListener(secondLevelBottomOptionListener); tabularView.setImmediate(true); graphicalViewGroup.addItem("Summary: All Tests of a Subject"); graphicalViewGroup.addItem("Difficulty Index of a Subject's Test"); graphicalViewGroup.addItem("Discrimination Index of a Subject's Test"); graphicalViewGroup.setWidth("300px"); graphicalViewGroup.addValueChangeListener(thirdLevelBottomOptionListener); graphicalViewGroup.setImmediate(true); tabularViewGroup.addItem("Summary: All Tests of a Subject"); tabularViewGroup.addItem("Critical values of a test"); tabularViewGroup.addValueChangeListener(thirdLevelBottomOptionListener); tabularViewGroup.setImmediate(true); searchSubject2.setInputPrompt("Search Subject"); searchSubject2.setWidth("225px"); searchSubject2.addValueChangeListener(dropDownChangeListener); searchSubject2.setEnabled(false); searchTest.setWidth("225px"); searchTest.setInputPrompt("Search Test"); searchTest.setEnabled(false); searchTest.addStyleName(ValoTheme.COMBOBOX_SMALL); bottomGrid.addComponent(bottom, 0, 0); bottomGrid.addComponent(graphicalView, 1, 0); bottomGrid.addComponent(tabularView, 1, 1); bottomGrid.addComponent(graphicalViewGroup, 2, 0); bottomGrid.addComponent(tabularViewGroup, 2, 1); bottomGrid.addComponent(searchSubject2, 1, 2); bottomGrid.addComponent(searchTest, 2, 2); addComponent(bottomGrid); addComponent(lineSeparator2); HorizontalLayout h = new HorizontalLayout(); h.setWidth("100%"); h.setMargin(true); Button calculateAndViewBtn = new Button("Calculate & View"); calculateAndViewBtn.setWidth("300px"); calculateAndViewBtn.addClickListener(buttonClickListener); h.addComponent(calculateAndViewBtn); h.setComponentAlignment(calculateAndViewBtn, Alignment.MIDDLE_LEFT); addComponent(calculateAndViewBtn); }
From source file:com.etest.view.tq.reports.ReportGeneratorUI.java
public ReportGeneratorUI() { setWidth("100%"); setMargin(true);/*from ww w.j a va2 s . co m*/ setSpacing(true); Label lineSeparator1 = new Label(); lineSeparator1.setContentMode(ContentMode.HTML); lineSeparator1.setStyleName("line-separator"); Label lineSeparator2 = new Label(); lineSeparator2.setContentMode(ContentMode.HTML); lineSeparator2.setStyleName("line-separator"); Label lineSeparator3 = new Label(); lineSeparator3.setContentMode(ContentMode.HTML); lineSeparator3.setStyleName("line-separator"); searchSubject1.addValueChangeListener(dropDownChangeListener); searchSubject1.setEnabled(false); searchApproveTq1.setWidth("100%"); searchApproveTq1.setInputPrompt("Search Approved TQ"); searchApproveTq1.setEnabled(false); searchApproveTq1.addStyleName(ValoTheme.COMBOBOX_SMALL); searchSubject2.addValueChangeListener(dropDownChangeListener); searchSubject2.setEnabled(false); searchApproveTq2.setWidth("100%"); searchApproveTq2.setInputPrompt("Search TQ Ticket No."); searchApproveTq2.setEnabled(false); searchApproveTq2.addStyleName(ValoTheme.COMBOBOX_SMALL); GridLayout g1 = new GridLayout(3, 1); g1.setWidth("70%"); g1.setSpacing(true); VerticalLayout v1 = new VerticalLayout(); v1.setWidth("5px"); reportType1.addItem("Test Questionnaire"); reportType1.setWidth("200px"); reportType1.addValueChangeListener(optionChangeListener); reportType1.setImmediate(true); v1.addComponent(reportType1); v1.setExpandRatio(reportType1, 1); g1.addComponent(v1, 0, 0); g1.addComponent(searchSubject1, 1, 0); g1.addComponent(searchApproveTq1, 2, 0); addComponent(g1); addComponent(lineSeparator1); GridLayout g2 = new GridLayout(3, 1); g2.setWidth("70%"); g2.setSpacing(true); VerticalLayout v2 = new VerticalLayout(); v2.setWidth("5px"); reportType2.addItem("Item Analysis"); reportType2.setWidth("200px"); reportType2.addValueChangeListener(optionChangeListener); reportType2.setImmediate(true); v2.addComponent(reportType2); v2.setExpandRatio(reportType2, 1); g2.addComponent(v2, 0, 0); g2.addComponent(searchSubject2, 1, 0); g2.addComponent(searchApproveTq2, 2, 0); addComponent(g2); addComponent(lineSeparator2); GridLayout g3 = new GridLayout(3, 1); g3.setWidth("70%"); g3.setSpacing(true); VerticalLayout v3 = new VerticalLayout(); v3.setWidth("5px"); reportType3.addItem("Test Bank Inventory"); reportType3.setWidth("200px"); reportType3.addValueChangeListener(optionChangeListener); reportType3.setImmediate(true); VerticalLayout v = new VerticalLayout(); v.setWidth("100%"); v.setSpacing(true); testBankInventory.addItem("Summary: Case vs Items"); testBankInventory.addItem("Summary: Items Group according to the Revised Blooms Taxonomy"); testBankInventory.setImmediate(true); testBankInventory.select("Summary: Case vs Items"); testBankInventory.setEnabled(false); v.addComponent(testBankInventory); v3.addComponent(reportType3); v3.setExpandRatio(reportType3, 1); g3.addComponent(v3, 0, 0); g3.setComponentAlignment(v3, Alignment.TOP_LEFT); g3.addComponent(v, 1, 0); addComponent(g3); // addComponent(new Label("<HR>", ContentMode.HTML)); addComponent(lineSeparator3); Button button = new Button("Calculate & Generate"); button.addClickListener(reportBtnClickListener); button.setWidth("300px"); addComponent(button); setComponentAlignment(button, Alignment.MIDDLE_LEFT); }
From source file:com.etest.view.tq.TQCoverageUI.java
Component buildTQCoverageForms() { FormLayout form = new FormLayout(); form.setWidth("500px"); examTitle.setCaption("Exam Title: "); examTitle.setWidth("100%"); examTitle.setIcon(FontAwesome.TAG);/* w w w . j a va 2 s . co m*/ examTitle.addStyleName(ValoTheme.TEXTFIELD_SMALL); form.addComponent(examTitle); subject.setCaption("Subject: "); subject.setWidth("100%"); subject.setIcon(FontAwesome.BOOK); subject.addStyleName(ValoTheme.COMBOBOX_SMALL); subject.addValueChangeListener((new CurriculumPropertyChangeListener(topic))); form.addComponent(subject); totalItems.setCaption("No. of Test Items: "); totalItems.setWidth("50%"); totalItems.setValue("0"); totalItems.setIcon(FontAwesome.TAG); totalItems.addStyleName(ValoTheme.TEXTFIELD_SMALL); totalItems.addValueChangeListener(fieldValueListener); form.addComponent(totalItems); Button button = new Button("ADD ROW"); button.setWidth("50%"); button.setIcon(FontAwesome.GEAR); button.addStyleName(ValoTheme.BUTTON_PRIMARY); button.addStyleName(ValoTheme.BUTTON_SMALL); button.addClickListener((Button.ClickEvent event) -> { if (examTitle.getValue() == null || examTitle.getValue().trim().isEmpty()) { Notification.show("Select an Exam Title!", Notification.Type.WARNING_MESSAGE); return; } if (subject.getValue() == null) { Notification.show("Select a Subject!", Notification.Type.WARNING_MESSAGE); return; } if (totalItems.getValue() == null || totalItems.getValue().trim().isEmpty()) { Notification.show("Enter No. of Test Items!", Notification.Type.WARNING_MESSAGE); return; } grid.addRow(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "del"); }); form.addComponent(button); return form; }
From source file:com.etest.view.tq.TQCoverageUI.java
Window getTopicWindow(Item item) { Window sub = new Window("TOPIC: "); sub.setWidth("500px"); sub.setModal(true);//w w w. j a va2 s .c o m sub.center(); sub.setResizable(false); VerticalLayout v = new VerticalLayout(); v.setWidth("100%"); v.setMargin(true); v.setSpacing(true); topic.setInputPrompt("Select a Topic.."); topic.addStyleName(ValoTheme.COMBOBOX_SMALL); topic.setWidth("100%"); topic.addValueChangeListener((Property.ValueChangeEvent event) -> { if (event.getProperty().getValue() == null) { } else { syllabusId = (int) event.getProperty().getValue(); topicStr = topic.getItem(topic.getValue()).toString(); } }); v.addComponent(topic); Button button = new Button("CLOSE"); button.setWidth("50%"); button.setIcon(FontAwesome.TASKS); button.addStyleName(ValoTheme.BUTTON_PRIMARY); button.addStyleName(ValoTheme.BUTTON_SMALL); button.addClickListener((Button.ClickEvent event) -> { if (topic.getValue() == null) { Notification.show("Select a Topic!", Notification.Type.WARNING_MESSAGE); } else { populateGridRow(item); populateGridFooter(); } sub.close(); }); v.addComponent(button); v.setComponentAlignment(button, Alignment.MIDDLE_RIGHT); sub.setContent(v); sub.getContent().setHeightUndefined(); return sub; }
From source file:com.fnc.common.abstractclasses.CommonComboBox.java
public CommonComboBox() { setWidth("100%"); setNullSelectionAllowed(false); setImmediate(true); addStyleName(ValoTheme.COMBOBOX_SMALL); setFilteringMode(FilteringMode.STARTSWITH); }
From source file:com.fnc.common.CorporateComboBoxPropertyListener.java
public CorporateComboBoxPropertyListener(ComboBox select, String comboBoxCaption) { this.select = select; this.comboBoxCaption = comboBoxCaption; select.setWidth("100%"); select.setNullSelectionAllowed(false); select.setImmediate(true);/*from w w w . ja v a2 s .c o m*/ select.addStyleName(ValoTheme.COMBOBOX_SMALL); select.setFilteringMode(FilteringMode.STARTSWITH); select.addContainerProperty("c", String.class, ""); select.setItemCaptionPropertyId("c"); addValueChangeListener(this); }
From source file:com.fnc.view.ui.AlphaListMainUI.java
FormLayout buildForms() { FormLayout form = new FormLayout(); form.setWidth("50%"); corporation.setCaption("Corporation: "); corporation.addStyleName(ValoTheme.COMBOBOX_SMALL); trade.setCaption("Trade: "); trade.addStyleName(ValoTheme.COMBOBOX_SMALL); branch.setCaption("Branch: "); branch.addStyleName(ValoTheme.COMBOBOX_SMALL); corporation.addValueChangeListener(new CorporateComboBoxPropertyListener(trade, trade.getCaption())); form.addComponent(corporation);// ww w . j ava 2s. c om trade.addValueChangeListener(new CorporateComboBoxPropertyListener(branch, branch.getCaption())); form.addComponent(trade); branch.addValueChangeListener(branchPropertyChangeListener); form.addComponent(branch); HorizontalLayout h = new HorizontalLayout(); h.setCaption("Year: "); h.setWidth("100%"); h.setSpacing(true); h.addComponent(selectYear()); h.addComponent(alphaListButton()); form.addComponent(h); return form; }
From source file:com.fnc.view.ui.AlphaListMainUI.java
ComboBox selectYear() { year = new ComboBox(); year.setWidth("100%"); year.setNullSelectionAllowed(false); year.addStyleName(ValoTheme.COMBOBOX_SMALL); Calendar cal = Calendar.getInstance(); cal.setTime(new Date()); int y = cal.get(Calendar.YEAR); for (int i = y; i > 2011; i--) { year.addItem(String.valueOf(i)); }//from w w w. j a v a2 s . c o m year.setValue(String.valueOf(y)); return year; }
From source file:com.fnc.view.ui.thirteenth.ThirteenthMonthUI.java
FormLayout buildForms() { FormLayout form = new FormLayout(); form.setWidth("50%"); corporation.setCaption("Corporation: "); corporation.addStyleName(ValoTheme.COMBOBOX_SMALL); trade.setCaption("Trade: "); trade.addStyleName(ValoTheme.COMBOBOX_SMALL); branch.setCaption("Branch: "); branch.addStyleName(ValoTheme.COMBOBOX_SMALL); corporation.addValueChangeListener(new CorporateComboBoxPropertyListener(trade, trade.getCaption())); form.addComponent(corporation);/*from w w w. ja v a 2 s . c om*/ trade.addValueChangeListener(new CorporateComboBoxPropertyListener(branch, branch.getCaption())); form.addComponent(trade); branch.addValueChangeListener(branchPropertyChangeListener); form.addComponent(branch); HorizontalLayout h = new HorizontalLayout(); h.setCaption("Year: "); h.setWidth("100%"); h.setSpacing(true); h.addComponent(selectYear()); h.addComponent(button()); form.addComponent(h); return form; }
From source file:com.hris.common.abstractclasses.AbstractComboBox.java
public AbstractComboBox() { setWidth("100%"); addStyleName(ValoTheme.COMBOBOX_SMALL); setNullSelectionAllowed(false); setImmediate(true); }