Revision 707b6237
Added by Niels Hoffmann over 12 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/HeadlineSection.java | ||
---|---|---|
5 | 5 |
|
6 | 6 |
|
7 | 7 |
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper; |
8 |
import eu.etaxonomy.cdm.model.common.ICdmBase; |
|
8 | 9 |
import eu.etaxonomy.cdm.model.common.IdentifiableEntity; |
9 |
import eu.etaxonomy.cdm.model.common.VersionableEntity; |
|
10 | 10 |
import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection; |
11 | 11 |
import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory; |
12 | 12 |
import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement; |
13 |
import eu.etaxonomy.taxeditor.ui.section.EmptyElement; |
|
14 | 13 |
|
15 | 14 |
/** |
16 | 15 |
* <p>HeadlineSection class.</p> |
... | ... | |
18 | 17 |
* @author n.hoffmann |
19 | 18 |
* @version $Id: $ |
20 | 19 |
*/ |
21 |
public class HeadlineSection extends AbstractFormSection<VersionableEntity> { |
|
22 |
|
|
23 |
private EmptyElement emptyElement; |
|
20 |
public class HeadlineSection extends AbstractFormSection<ICdmBase> { |
|
24 | 21 |
|
25 | 22 |
/** |
26 | 23 |
* <p>Constructor for HeadlineSection.</p> |
... | ... | |
32 | 29 |
public HeadlineSection(CdmFormFactory cdmFormFactory, ICdmFormElement parentElement, |
33 | 30 |
int style) { |
34 | 31 |
super(cdmFormFactory, null, parentElement, style); |
35 |
emptyElement = cdmFormFactory.createEmptyElement(this); |
|
36 | 32 |
} |
37 | 33 |
|
38 | 34 |
/** {@inheritDoc} */ |
39 | 35 |
@Override |
40 |
public void setEntity(VersionableEntity versionableEntity) {
|
|
41 |
VersionableEntity entity = (VersionableEntity) HibernateProxyHelper.deproxy(versionableEntity);
|
|
36 |
public void setEntity(ICdmBase cdmBase) {
|
|
37 |
ICdmBase entity = (ICdmBase) HibernateProxyHelper.deproxy(cdmBase);
|
|
42 | 38 |
super.setEntity(entity); |
43 | 39 |
setText(entity.getClass().getSimpleName() + (entity instanceof IdentifiableEntity ? ": " + ((IdentifiableEntity) entity).getTitleCache() : "")); |
44 | 40 |
layout(); |
Also available in: Unified diff
Merged with trunk