List of usage examples for com.vaadin.server FontAwesome REFRESH
FontAwesome REFRESH
To view the source code for com.vaadin.server FontAwesome REFRESH.
Click Source Link
From source file:uicomponents.TechChooser.java
License:Open Source License
/** * Creates a new condition chooser component * //ww w . java 2s. c om * @param options List of different possible conditions * @param other Name of the "other" condition, which when selected will enable an input field for * free text * @param special Name of a "special" condition like species for the entity input, which when * selected will disable the normal species input because there is more than one instance * @param nullSelectionAllowed true, if the conditions may be empty */ public TechChooser(List<String> options, Set<String> persons) { chooser = new ComboBox("Analyte", options); chooser.setStyleName(Styles.boxTheme); replicates = new OpenbisInfoTextField("Replicates", "", "50px", "1"); pool = new CheckBox("Pool/Multiplex Samples"); setSpacing(true); helpers = new ArrayList<HorizontalLayout>(); HorizontalLayout help1 = Styles.questionize(chooser, "Choose the analyte that is measured.", "Analytes"); addComponent(help1); HorizontalLayout help2 = Styles.questionize(replicates.getInnerComponent(), "Number of prepared replicates (1 means no replicates) of this analyte", "Replicates"); addComponent(help2); HorizontalLayout persBoxH = new HorizontalLayout(); persBoxH.setCaption("Contact Person"); person = new ComboBox(); person.addItems(persons); person.setFilteringMode(FilteringMode.CONTAINS); person.setStyleName(Styles.boxTheme); reloadPeople = new Button(); Styles.iconButton(reloadPeople, FontAwesome.REFRESH); persBoxH.addComponent(person); persBoxH.addComponent(reloadPeople); HorizontalLayout help3 = Styles.questionize(persBoxH, "Person responsible for this part of the experiment", "Contact Person"); addComponent(help3); HorizontalLayout help4 = Styles.questionize(pool, "Select if multiple samples are pooled into a single " + "sample before measurement.", "Pooling"); chooser.addValueChangeListener(new ValueChangeListener() { @Override public void valueChange(ValueChangeEvent event) { if (chooser.getValue() != null) { help4.setVisible(!chooser.getValue().equals("PROTEINS")); } } }); addComponent(help4); helpers.add(help1); helpers.add(help2); helpers.add(help3); helpers.add(help4); }