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