Revision e3a4a3ff
Added by Andreas Müller almost 7 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/HybridDetailSection.java | ||
---|---|---|
13 | 13 |
|
14 | 14 |
import eu.etaxonomy.cdm.api.conversation.ConversationHolder; |
15 | 15 |
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper; |
16 |
import eu.etaxonomy.cdm.model.name.NonViralName; |
|
17 |
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
|
|
16 |
import eu.etaxonomy.cdm.model.name.INonViralName;
|
|
17 |
import eu.etaxonomy.cdm.model.name.TaxonName; |
|
18 | 18 |
import eu.etaxonomy.cdm.model.taxon.TaxonBase; |
19 | 19 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; |
20 | 20 |
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; |
... | ... | |
25 | 25 |
/** |
26 | 26 |
* @author n.hoffmann |
27 | 27 |
* @created Jan 5, 2011 |
28 |
* @version 1.0 |
|
29 | 28 |
*/ |
30 |
public class HybridDetailSection extends AbstractCdmDetailSection<TaxonNameBase> implements
|
|
29 |
public class HybridDetailSection extends AbstractCdmDetailSection<TaxonName> implements |
|
31 | 30 |
ITaxonBaseDetailSection { |
32 | 31 |
|
33 | 32 |
private TaxonBase taxonBase; |
... | ... | |
45 | 44 |
super(formFactory, conversation, parentElement, selectionProvider, style); |
46 | 45 |
} |
47 | 46 |
|
48 |
|
|
49 |
/* (non-Javadoc) |
|
50 |
* @see eu.etaxonomy.taxeditor.section.ITaxonBaseDetailSection#setTaxonBase(eu.etaxonomy.cdm.model.taxon.TaxonBase) |
|
51 |
*/ |
|
52 | 47 |
@Override |
53 | 48 |
public void setTaxonBase(TaxonBase taxon) { |
54 | 49 |
taxonBase = taxon; |
55 |
NonViralName name = (NonViralName) HibernateProxyHelper.deproxy(taxon.getName());
|
|
50 |
TaxonName name = HibernateProxyHelper.deproxy(taxon.getName());
|
|
56 | 51 |
setEntity(name); |
57 | 52 |
} |
58 | 53 |
|
59 |
/* (non-Javadoc) |
|
60 |
* @see eu.etaxonomy.taxeditor.section.ITaxonBaseDetailSection#getTaxonBase() |
|
61 |
*/ |
|
62 | 54 |
@Override |
63 | 55 |
public TaxonBase getTaxonBase() { |
64 | 56 |
return taxonBase; |
65 | 57 |
} |
66 | 58 |
|
67 |
/* (non-Javadoc) |
|
68 |
* @see eu.etaxonomy.taxeditor.section.AbstractCdmDetailSection#getHeading() |
|
69 |
*/ |
|
70 | 59 |
@Override |
71 | 60 |
public String getHeading() { |
72 | 61 |
return "Hybrid"; |
73 | 62 |
} |
74 | 63 |
|
75 |
/* (non-Javadoc) |
|
76 |
* @see eu.etaxonomy.taxeditor.section.AbstractCdmDetailSection#setSectionTitle() |
|
77 |
*/ |
|
78 | 64 |
@Override |
79 | 65 |
protected void setSectionTitle() { |
80 | 66 |
setText(getHeading()); |
81 | 67 |
} |
82 | 68 |
|
83 |
/* (non-Javadoc) |
|
84 |
* @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#createCdmDetailElement(eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection, int) |
|
85 |
*/ |
|
86 | 69 |
@Override |
87 |
protected AbstractCdmDetailElement createCdmDetailElement(AbstractCdmDetailSection<TaxonNameBase> parentElement, int style) { |
|
70 |
protected AbstractCdmDetailElement createCdmDetailElement( |
|
71 |
AbstractCdmDetailSection<TaxonName> parentElement, int style) { |
|
88 | 72 |
//FIXME generic |
89 | 73 |
return formFactory.createHybridDetailElement(parentElement); |
90 | 74 |
} |
Also available in: Unified diff
ref #6446 merge taxon name subclasses in TaxEditor