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 SpecimenTypeDesignationDTO
41 NativeSelect type
= new NativeSelect();
42 ToOneRelatedEntityCombobox
<Reference
> citation
= new ToOneRelatedEntityCombobox
<Reference
>(null, Reference
.class);
43 TextField citationMicroReference
= new TextFieldNFix();
44 TextField ruleConsidered
= new TextFieldNFix();
45 NativeSelect codeEdition
= new NativeSelect();
47 public NomenclaturalStatusRow() {
49 citation
.setWidth(200, Unit
.PIXELS
);
50 citation
.setNestedButtonStateUpdater(new ToOneRelatedEntityButtonUpdater
<Reference
>(citation
));
51 citationMicroReference
.setWidth(200, Unit
.PIXELS
);
52 ruleConsidered
.setWidth(200, Unit
.PIXELS
);
53 codeEdition
.setWidth(200, Unit
.PIXELS
);
59 public Component
[] components() {
60 Component
[] components
= new Component
[]{
63 citationMicroReference
,
67 addAll(Arrays
.asList(components
));
71 public static List
<String
> visibleFields() {
72 List
<String
> visibleFields
= Arrays
.asList(new String
[]{
75 "citationMicroReference",
86 public void updateRowItemsEnablement() {