2 * Copyright (C) 2019 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
9 package eu
.etaxonomy
.cdm
.vaadin
.view
.name
;
11 import java
.util
.Arrays
;
12 import java
.util
.List
;
14 import com
.vaadin
.server
.Sizeable
.Unit
;
15 import com
.vaadin
.ui
.Component
;
16 import com
.vaadin
.ui
.NativeSelect
;
17 import com
.vaadin
.ui
.TextField
;
19 import eu
.etaxonomy
.cdm
.model
.reference
.Reference
;
20 import eu
.etaxonomy
.cdm
.vaadin
.component
.CollectionRow
;
21 import eu
.etaxonomy
.cdm
.vaadin
.component
.CollectionRowItemCollection
;
22 import eu
.etaxonomy
.cdm
.vaadin
.component
.TextFieldNFix
;
23 import eu
.etaxonomy
.cdm
.vaadin
.event
.ToOneRelatedEntityButtonUpdater
;
24 import eu
.etaxonomy
.vaadin
.component
.ToOneRelatedEntityCombobox
;
27 * @author a.kohlbecker
31 public class NomenclaturalStatusRow
extends CollectionRowItemCollection
implements CollectionRow
{
34 private static final long serialVersionUID
= -4088064849794846181L;
39 * The fieldname must match the properties of the NomenclaturalStatusDTO
41 NativeSelect type
= new NativeSelect();
42 ToOneRelatedEntityCombobox
<Reference
> citation
= new ToOneRelatedEntityCombobox
<>(null, Reference
.class);
43 TextField citationMicroReference
= new TextFieldNFix();
44 TextField ruleConsidered
= new TextFieldNFix();
45 NativeSelect codeEdition
= new NativeSelect();
47 public NomenclaturalStatusRow() {
49 citation
.setWidth(250, Unit
.PIXELS
);
50 citation
.setNestedButtonStateUpdater(new ToOneRelatedEntityButtonUpdater
<Reference
>(citation
));
51 citationMicroReference
.setWidth(100, Unit
.PIXELS
);
52 ruleConsidered
.setWidth(100, Unit
.PIXELS
);
53 codeEdition
.setWidth(110, Unit
.PIXELS
);
57 * @return the components of this NomenclaturalStatusRow
58 * in the order to display
60 public Component
[] components() {
61 Component
[] components
= new Component
[]{
66 citationMicroReference
,
68 addAll(Arrays
.asList(components
));
72 public static List
<String
> visibleFields() {
73 List
<String
> visibleFields
= Arrays
.asList(new String
[]{
78 "citationMicroReference",
84 public void updateRowItemsEnablement() {