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/vocabulary/DefinedTermDetailSection.java | ||
---|---|---|
10 | 10 |
package eu.etaxonomy.taxeditor.ui.section.vocabulary; |
11 | 11 |
|
12 | 12 |
import org.eclipse.jface.viewers.ISelectionProvider; |
13 |
import org.eclipse.ui.forms.widgets.TableWrapLayout; |
|
14 | 13 |
|
15 | 14 |
import eu.etaxonomy.cdm.api.conversation.ConversationHolder; |
16 | 15 |
import eu.etaxonomy.cdm.model.common.DefinedTermBase; |
17 | 16 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; |
18 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.DetailType; |
|
19 | 17 |
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; |
18 |
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement; |
|
20 | 19 |
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection; |
21 | 20 |
|
22 | 21 |
/** |
... | ... | |
41 | 40 |
} |
42 | 41 |
|
43 | 42 |
/* (non-Javadoc) |
44 |
* @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#getDetailType()
|
|
43 |
* @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#getHeading()
|
|
45 | 44 |
*/ |
46 | 45 |
@Override |
47 |
protected DetailType getDetailType() {
|
|
48 |
return null;
|
|
46 |
public String getHeading() {
|
|
47 |
return "Defined Term: "+ (getEntity() != null ? getEntity().getLabel() : "");
|
|
49 | 48 |
} |
50 | 49 |
|
51 |
@Override |
|
52 |
protected void createControlsByType(AbstractCdmDetailSection<T> abstractCdmDetailSection, Class<T> clazz, int style) { |
|
53 |
TableWrapLayout layout = (TableWrapLayout) getLayoutComposite().getLayout(); |
|
54 |
layout.topMargin = 10; |
|
55 |
layout.numColumns = 2; |
|
56 |
|
|
57 |
getLayoutComposite().setLayout(layout); |
|
58 |
detailElement = formFactory.createDefinedTermDetailElement(clazz, abstractCdmDetailSection, style); |
|
59 |
} |
|
50 |
//FIXME clean up create element methods |
|
51 |
/* (non-Javadoc) |
|
52 |
* @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#createCdmDetailElementByType(eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection, java.lang.Class, int) |
|
53 |
*/ |
|
54 |
@Override |
|
55 |
protected AbstractCdmDetailElement createCdmDetailElementByType(AbstractCdmDetailSection<T> parentElement, Class<T> entityClass, int style) { |
|
56 |
return formFactory.createDefinedTermDetailElement(entityClass, parentElement, style); |
|
57 |
} |
|
60 | 58 |
|
61 | 59 |
/* (non-Javadoc) |
62 |
* @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#getHeading()
|
|
60 |
* @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#createCdmDetailElement(eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection, int)
|
|
63 | 61 |
*/ |
64 | 62 |
@Override |
65 |
public String getHeading() {
|
|
66 |
return "Defined Term: "+ (getEntity() != null ? getEntity().getLabel() : "");
|
|
63 |
protected AbstractCdmDetailElement<T> createCdmDetailElement(AbstractCdmDetailSection<T> parentElement, int style) {
|
|
64 |
return null;
|
|
67 | 65 |
} |
68 | 66 |
|
69 | 67 |
} |
Also available in: Unified diff