1
|
/**
|
2
|
* Copyright (C) 2007 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
6
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8
|
*/
|
9
|
|
10
|
package eu.etaxonomy.taxeditor.ui.section.description;
|
11
|
|
12
|
import org.eclipse.jface.viewers.ISelectionProvider;
|
13
|
import org.eclipse.ui.forms.widgets.ExpandableComposite;
|
14
|
|
15
|
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
|
16
|
import eu.etaxonomy.cdm.model.media.Media;
|
17
|
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
|
18
|
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
|
19
|
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
|
20
|
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
|
21
|
import eu.etaxonomy.taxeditor.ui.section.media.MediaMetaElement;
|
22
|
|
23
|
/**
|
24
|
* <p>MediaDetailsSection class.</p>
|
25
|
*
|
26
|
* @author n.hoffmann
|
27
|
* @created Jun 15, 2010
|
28
|
* @version 1.0
|
29
|
*/
|
30
|
public class MediaDetailsSection extends AbstractCdmDetailSection<Media> {
|
31
|
|
32
|
private MediaMetaElement mediaMetaElement;
|
33
|
|
34
|
public MediaDetailsSection(CdmFormFactory formFactory, ConversationHolder conversation,
|
35
|
ICdmFormElement parentElement,
|
36
|
ISelectionProvider selectionProvider, int style) {
|
37
|
super(formFactory, conversation, parentElement, selectionProvider, style);
|
38
|
}
|
39
|
|
40
|
@Override
|
41
|
public void setEntity(Media entity) {
|
42
|
if(mediaMetaElement != null){
|
43
|
this.removeElements();
|
44
|
}
|
45
|
mediaMetaElement = (MediaMetaElement) formFactory.createEntityCollectionElement(this, entity, null, null, ExpandableComposite.EXPANDED);
|
46
|
super.setEntity(entity);
|
47
|
setSectionTitle();
|
48
|
setTextClient(createToolbar());
|
49
|
layout();
|
50
|
}
|
51
|
|
52
|
/** {@inheritDoc} */
|
53
|
@Override
|
54
|
public String getHeading() {
|
55
|
return "Image";
|
56
|
}
|
57
|
|
58
|
@Override
|
59
|
protected AbstractCdmDetailElement<Media> createCdmDetailElement(AbstractCdmDetailSection<Media> parentElement, int style) {
|
60
|
return null;
|
61
|
}
|
62
|
}
|