Revision 5b087075
Added by Patrick Plitzner almost 11 years ago
- completely removed EntityDetailType enum and all its uses
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/MediaElement.java | ||
---|---|---|
1 | 1 |
/** |
2 |
*
|
|
2 |
* |
|
3 | 3 |
*/ |
4 | 4 |
package eu.etaxonomy.taxeditor.ui.section.media; |
5 | 5 |
|
... | ... | |
13 | 13 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
14 | 14 |
import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection; |
15 | 15 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; |
16 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.EntityDetailType; |
|
17 | 16 |
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; |
18 | 17 |
import eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement; |
19 | 18 |
import eu.etaxonomy.taxeditor.ui.element.LayoutConstants; |
... | ... | |
25 | 24 |
* <p> |
26 | 25 |
* MediaElement class. |
27 | 26 |
* </p> |
28 |
*
|
|
27 |
* |
|
29 | 28 |
* @author n.hoffmann |
30 | 29 |
* @created Nov 17, 2009 |
31 | 30 |
* @version 1.0 |
... | ... | |
41 | 40 |
* <p> |
42 | 41 |
* Constructor for MediaElement. |
43 | 42 |
* </p> |
44 |
*
|
|
43 |
* |
|
45 | 44 |
* @param formElement |
46 | 45 |
* a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection} |
47 | 46 |
* object. |
... | ... | |
63 | 62 |
|
64 | 63 |
/* |
65 | 64 |
* (non-Javadoc) |
66 |
*
|
|
65 |
* |
|
67 | 66 |
* @see |
68 | 67 |
* eu.etaxonomy.taxeditor.forms.entitysections.AbstractEntitySetElementComposite |
69 | 68 |
* #createControls(org.eclipse.swt.widgets.Composite, int) |
70 | 69 |
*/ |
71 | 70 |
/** {@inheritDoc} */ |
72 |
@Override |
|
73 |
public void createControls(ICdmFormElement element, int style) { |
|
74 |
text_title = formFactory.createLanguageStringWithLabelElement(element, |
|
75 |
"Title", null, style); |
|
76 |
selection_artist = formFactory |
|
77 |
.createSelectionElement(AgentBase.class, |
|
78 |
getConversationHolder(), element, "Artist", null, |
|
79 |
EntitySelectionElement.ALL, style); |
|
80 |
text_description = formFactory.createLanguageStringWithLabelElement( |
|
81 |
element, "Description", null, 100, style); |
|
82 |
section_mediaRepresentation = (MediaRepresentationSection) formFactory |
|
83 |
.createEntityDetailSection( |
|
84 |
EntityDetailType.MEDIAREPRESENTATION, |
|
85 |
getConversationHolder(), element, style); |
|
86 |
section_mediaRepresentation.setLayoutData(LayoutConstants |
|
87 |
.FILL_HORIZONTALLY(2, 1)); |
|
71 |
@Override |
|
72 |
public void createControls(ICdmFormElement element, int style) { |
|
73 |
text_title = formFactory.createLanguageStringWithLabelElement(element, "Title", null, style); |
|
74 |
selection_artist = formFactory.createSelectionElement(AgentBase.class, getConversationHolder(), element, "Artist", null, EntitySelectionElement.ALL, style); |
|
75 |
text_description = formFactory.createLanguageStringWithLabelElement(element, "Description", null, 100, style); |
|
76 |
section_mediaRepresentation = formFactory.createMediaRepresentationSection(getConversationHolder(), element, style); |
|
77 |
section_mediaRepresentation.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1)); |
|
88 | 78 |
} |
89 | 79 |
|
90 | 80 |
/** {@inheritDoc} */ |
... | ... | |
110 | 100 |
|
111 | 101 |
/* |
112 | 102 |
* (non-Javadoc) |
113 |
*
|
|
103 |
* |
|
114 | 104 |
* @see |
115 | 105 |
* eu.etaxonomy.taxeditor.section.AbstractEntityCollectionElement#handleEvent |
116 | 106 |
* (java.lang.Object) |
Also available in: Unified diff