Revision 0bae5e5a
Added by Patrick Plitzner over 8 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/MediaMetaElement.java | ||
---|---|---|
20 | 20 |
import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection; |
21 | 21 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; |
22 | 22 |
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; |
23 |
import eu.etaxonomy.taxeditor.ui.element.ISelectableElement; |
|
23 | 24 |
import eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement; |
25 |
import eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator; |
|
24 | 26 |
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection; |
25 | 27 |
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement; |
26 | 28 |
import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement; |
... | ... | |
30 | 32 |
* @created Nov 17, 2009 |
31 | 33 |
* @version 1.0 |
32 | 34 |
*/ |
33 |
public class MediaMetaElement extends AbstractEntityCollectionElement<Media> implements ITogglableMediaElement{ |
|
35 |
public class MediaMetaElement extends AbstractEntityCollectionElement<Media> implements ISelectableElement, ITogglableMediaElement{
|
|
34 | 36 |
|
35 | 37 |
private EntitySelectionElement<AgentBase> selection_artist; |
36 | 38 |
private LanguageStringWithLabelElement text_description; |
37 | 39 |
private LanguageStringWithLabelElement text_title; |
38 | 40 |
private MediaDetailElement mediaDetailElement; |
41 |
private SelectionArbitrator selectionArbitrator; |
|
39 | 42 |
|
40 | 43 |
public MediaMetaElement(CdmFormFactory cdmFormFactory, |
41 | 44 |
AbstractFormSection<?> formElement, Media element, |
42 | 45 |
SelectionListener removeListener, boolean isChoosableEntity, int style) { |
43 | 46 |
super(cdmFormFactory, formElement, element, removeListener, isChoosableEntity, null, style); |
47 |
//make element selectable |
|
48 |
if(cdmFormFactory.getSelectionProvider() != null){ |
|
49 |
selectionArbitrator = cdmFormFactory.createSelectionArbitrator(this); |
|
50 |
} |
|
44 | 51 |
} |
45 | 52 |
|
46 | 53 |
/** {@inheritDoc} */ |
... | ... | |
108 | 115 |
} |
109 | 116 |
} |
110 | 117 |
|
118 |
@Override |
|
119 |
public SelectionArbitrator getSelectionArbitrator() { |
|
120 |
return selectionArbitrator; |
|
121 |
} |
|
122 |
|
|
111 | 123 |
} |
Also available in: Unified diff
Add selection listener to media detail element to allow showing
supplemental data (#3367)