Revision 49a35b7d
Added by Patrick Plitzner over 7 years ago
src/main/java/eu/etaxonomy/cdm/vaadin/view/dbstatus/DistributionSelectionView.java | ||
---|---|---|
1 | 1 |
package eu.etaxonomy.cdm.vaadin.view.dbstatus; |
2 | 2 |
|
3 |
import java.sql.SQLException; |
|
4 | 3 |
import java.util.List; |
5 | 4 |
import java.util.Set; |
6 | 5 |
|
... | ... | |
29 | 28 |
import eu.etaxonomy.cdm.model.taxon.TaxonNode; |
30 | 29 |
import eu.etaxonomy.cdm.vaadin.container.NamedAreaContainer; |
31 | 30 |
import eu.etaxonomy.cdm.vaadin.container.TaxonNodeContainer; |
31 |
import eu.etaxonomy.cdm.vaadin.presenter.dbstatus.DistributionSelectionPresenter; |
|
32 | 32 |
|
33 |
public class DistributionSelectionView extends CustomComponent implements IDistributionSelectionComponent, View, ClickListener{
|
|
33 |
public class DistributionSelectionView extends CustomComponent implements View, ClickListener{ |
|
34 | 34 |
|
35 | 35 |
private VerticalLayout mainLayout; |
36 | 36 |
private Panel panel_1; |
... | ... | |
44 | 44 |
private Label labelNoClassification; |
45 | 45 |
|
46 | 46 |
private static final long serialVersionUID = 1L; |
47 |
private DistributionSelectionComponentListener distListener;
|
|
47 |
private DistributionSelectionPresenter distListener;
|
|
48 | 48 |
/** |
49 | 49 |
* The constructor should first build the main layout, set the |
50 | 50 |
* composition root and then do any custom initialization. |
... | ... | |
61 | 61 |
} |
62 | 62 |
|
63 | 63 |
|
64 |
@Override |
|
65 |
public void addListener(DistributionSelectionComponentListener listener) { |
|
64 |
public void addListener(DistributionSelectionPresenter listener) { |
|
66 | 65 |
distListener = listener; |
67 | 66 |
} |
68 | 67 |
|
... | ... | |
74 | 73 |
} |
75 | 74 |
TermVocabulary<DefinedTermBase> term = (TermVocabulary<DefinedTermBase>)distributionAreaBox.getValue(); |
76 | 75 |
Set<NamedArea> selectedAreas = (Set<NamedArea>) namedAreaList.getValue(); |
77 |
try { |
|
78 |
distListener.buttonClick(taxonNode, term, selectedAreas); |
|
79 |
} catch (SQLException e) { |
|
80 |
e.printStackTrace(); |
|
81 |
} |
|
76 |
distListener.buttonClick(taxonNode, term, selectedAreas); |
|
82 | 77 |
} |
83 | 78 |
|
84 | 79 |
public void dataBinding(){ |
Also available in: Unified diff
ref #5458 Refactoring