Revision 139902da
Added by Patrick Plitzner almost 11 years ago
- completely removed DetailType enum and all its uses
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/NameDetailSection.java | ||
---|---|---|
1 | 1 |
// $Id$ |
2 | 2 |
/** |
3 | 3 |
* Copyright (C) 2007 EDIT |
4 |
* European Distributed Institute of Taxonomy
|
|
4 |
* European Distributed Institute of Taxonomy |
|
5 | 5 |
* http://www.e-taxonomy.eu |
6 |
*
|
|
6 |
* |
|
7 | 7 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
8 | 8 |
* See LICENSE.TXT at the top of this package for the full license terms. |
9 | 9 |
*/ |
... | ... | |
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; |
21 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType;
|
|
21 |
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
|
|
22 | 22 |
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection; |
23 | 23 |
import eu.etaxonomy.taxeditor.ui.section.ITaxonBaseDetailSection; |
24 | 24 |
|
... | ... | |
48 | 48 |
} |
49 | 49 |
|
50 | 50 |
/** {@inheritDoc} */ |
51 |
public void setTaxonBase(TaxonBase entity) { |
|
51 |
@Override |
|
52 |
public void setTaxonBase(TaxonBase entity) { |
|
52 | 53 |
this.taxonBase = entity; |
53 | 54 |
NonViralName name = (NonViralName) HibernateProxyHelper.deproxy(entity.getName()); |
54 | 55 |
setEntity(name); |
... | ... | |
60 | 61 |
return "Scientific Name"; |
61 | 62 |
} |
62 | 63 |
|
63 |
/** {@inheritDoc} */ |
|
64 |
@Override |
|
65 |
protected DetailType getDetailType() { |
|
66 |
return DetailType.SCIENTIFICNAME; |
|
67 |
} |
|
68 |
|
|
69 | 64 |
/** {@inheritDoc} */ |
70 | 65 |
@Override |
71 | 66 |
protected void setSectionTitle() { |
72 | 67 |
if(!isDisposed()){ |
73 | 68 |
String title = ""; |
74 | 69 |
if(getEntity() != null && (getEntity() instanceof NonViralName)){ |
75 |
title = ": " + ((NonViralName) getEntity()).getNameCache();
|
|
70 |
title = ": " + getEntity().getNameCache();
|
|
76 | 71 |
} |
77 | 72 |
this.setText(getHeading() + title); |
78 | 73 |
} |
... | ... | |
85 | 80 |
public TaxonBase getTaxonBase() { |
86 | 81 |
return taxonBase; |
87 | 82 |
} |
88 |
|
|
83 |
|
|
84 |
/* (non-Javadoc) |
|
85 |
* @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#createCdmDetailElement(eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection, int) |
|
86 |
*/ |
|
87 |
@Override |
|
88 |
protected AbstractCdmDetailElement<NonViralName> createCdmDetailElement(AbstractCdmDetailSection<NonViralName> parentElement, int style) { |
|
89 |
return formFactory.createNameDetailElement(parentElement, style); |
|
90 |
} |
|
89 | 91 |
} |
Also available in: Unified diff