1
|
/**
|
2
|
* Copyright (C) 2018 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
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.
|
8
|
*/
|
9
|
package eu.etaxonomy.cdm.vaadin.component.registration;
|
10
|
|
11
|
import java.util.Collection;
|
12
|
|
13
|
import com.vaadin.ui.CssLayout;
|
14
|
import com.vaadin.ui.Layout;
|
15
|
import com.vaadin.ui.Panel;
|
16
|
|
17
|
import eu.etaxonomy.cdm.api.service.dto.RegistrationDTO;
|
18
|
import eu.etaxonomy.cdm.model.ICdmEntityUuidCacher;
|
19
|
import eu.etaxonomy.vaadin.mvp.AbstractView;
|
20
|
|
21
|
/**
|
22
|
* @author a.kohlbecker
|
23
|
* @since Feb 6, 2018
|
24
|
*
|
25
|
*/
|
26
|
public class RegistrationItemsPanel extends Panel {
|
27
|
|
28
|
|
29
|
/**
|
30
|
*
|
31
|
*/
|
32
|
private static final long serialVersionUID = -3763419770580196601L;
|
33
|
|
34
|
public RegistrationItemsPanel(AbstractView<?> parentView, String caption, Collection<RegistrationDTO> regDtos, ICdmEntityUuidCacher cache){
|
35
|
|
36
|
super(caption);
|
37
|
|
38
|
Layout container = new CssLayout();
|
39
|
container.setWidth(100, Unit.PERCENTAGE);
|
40
|
setContent(container);
|
41
|
for(RegistrationDTO dto : regDtos){
|
42
|
RegistrationItem item = new RegistrationItem(dto, parentView, cache);
|
43
|
container.addComponent(item);
|
44
|
}
|
45
|
setWidth(100, Unit.PERCENTAGE);
|
46
|
}
|
47
|
|
48
|
|
49
|
|
50
|
}
|