Revision 38798657
Added by Patrick Plitzner over 7 years ago
src/main/java/eu/etaxonomy/cdm/vaadin/view/dbstatus/DistributionSelectionView.java | ||
---|---|---|
35 | 35 |
private ComboBox distributionAreaBox; |
36 | 36 |
private ComboBox classificationBox; |
37 | 37 |
private Tree taxonTree; |
38 |
private Label label_1; |
|
38 |
private Label labelInstruction; |
|
39 |
private Label labelNoClassification; |
|
39 | 40 |
|
40 | 41 |
private static final long serialVersionUID = 1L; |
41 | 42 |
private DistributionSelectionComponentListener distListener; |
... | ... | |
82 | 83 |
@Override |
83 | 84 |
public void valueChange(ValueChangeEvent event) { |
84 | 85 |
TaxonNode parentNode = (TaxonNode) event.getProperty().getValue(); |
85 |
taxonTree.setContainerDataSource(new TaxonNodeContainer(parentNode)); |
|
86 |
if(parentNode!=null){ |
|
87 |
taxonTree.setContainerDataSource(new TaxonNodeContainer(parentNode)); |
|
88 |
} |
|
89 |
else{ |
|
90 |
taxonTree.setContainerDataSource(null); |
|
91 |
} |
|
92 |
labelNoClassification.setVisible(parentNode==null); |
|
86 | 93 |
} |
87 | 94 |
}); |
88 | 95 |
|
... | ... | |
142 | 149 |
verticalLayout_2.setMargin(true); |
143 | 150 |
verticalLayout_2.setSpacing(true); |
144 | 151 |
|
145 |
// label_1 |
|
146 |
label_1 = new Label(); |
|
147 |
label_1.setImmediate(false); |
|
148 |
label_1.setWidth("213px"); |
|
149 |
label_1.setHeight("-1px"); |
|
150 |
label_1.setValue("Please choose a Classification and/or taxon and a distribution area to proceed."); |
|
151 |
verticalLayout_2.addComponent(label_1); |
|
152 |
labelInstruction = new Label(); |
|
153 |
labelInstruction.setImmediate(false); |
|
154 |
labelInstruction.setWidth("213px"); |
|
155 |
labelInstruction.setHeight("-1px"); |
|
156 |
labelInstruction.setValue("Please choose a Classification and/or taxon and a distribution area to proceed."); |
|
157 |
verticalLayout_2.addComponent(labelInstruction); |
|
152 | 158 |
|
153 | 159 |
// classificationBox |
154 | 160 |
classificationBox = new ComboBox(); |
... | ... | |
170 | 176 |
taxonTree = new Tree("Taxonomy"); |
171 | 177 |
taxonTree.setWidth("200px"); |
172 | 178 |
verticalLayout_2.addComponent(taxonTree); |
179 |
labelNoClassification = new Label(" - Please select a classification - "); |
|
180 |
verticalLayout_2.addComponent(labelNoClassification); |
|
181 |
verticalLayout_2.setComponentAlignment(labelNoClassification, Alignment.BOTTOM_RIGHT); |
|
173 | 182 |
|
174 | 183 |
// button_proceed |
175 | 184 |
button_proceed = new Button(); |
Also available in: Unified diff
ref #5458 Enhance user messages