Revision 3be6ef3e
Added by Niels Hoffmann over 13 years ago
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/section/supplemental/MediaSection.java | ||
---|---|---|
14 | 14 |
import eu.etaxonomy.taxeditor.section.AbstractEntityCollectionSection; |
15 | 15 |
|
16 | 16 |
/** |
17 |
* |
|
18 |
* @author nho |
|
17 |
* <p>MediaSection class.</p> |
|
19 | 18 |
* |
19 |
* @author nho |
|
20 |
* @version $Id: $ |
|
20 | 21 |
*/ |
21 | 22 |
public class MediaSection extends AbstractEntityCollectionSection<IdentifiableMediaEntity, Media>{ |
22 | 23 |
|
23 | 24 |
/** |
24 |
* @param parentElement |
|
25 |
* @param entity |
|
26 |
* @param style |
|
25 |
* <p>Constructor for MediaSection.</p> |
|
26 |
* |
|
27 |
* @param parentElement a {@link eu.etaxonomy.taxeditor.forms.ICdmFormElement} object. |
|
28 |
* @param style a int. |
|
29 |
* @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.forms.CdmFormFactory} object. |
|
30 |
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object. |
|
27 | 31 |
*/ |
28 | 32 |
public MediaSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, ICdmFormElement parentElement, int style) { |
29 | 33 |
super(cdmFormFactory, conversation, parentElement, "Media", style); |
30 | 34 |
} |
31 | 35 |
|
36 |
/** {@inheritDoc} */ |
|
32 | 37 |
@Override |
33 | 38 |
public Media createNewElement() { |
34 | 39 |
return Media.NewInstance(); |
35 | 40 |
} |
36 | 41 |
|
42 |
/** {@inheritDoc} */ |
|
37 | 43 |
@Override |
38 | 44 |
public Collection<Media> getCollection(IdentifiableMediaEntity entity) { |
39 | 45 |
return entity.getMedia(); |
40 | 46 |
} |
41 | 47 |
|
48 |
/** {@inheritDoc} */ |
|
42 | 49 |
@Override |
43 | 50 |
public String getEmptyString() { |
44 | 51 |
return "No media yet."; |
45 | 52 |
} |
46 | 53 |
|
54 |
/** {@inheritDoc} */ |
|
47 | 55 |
@Override |
48 | 56 |
protected String getTooltipString() { |
49 | 57 |
return "Create new media"; |
50 | 58 |
} |
51 | 59 |
|
60 |
/** {@inheritDoc} */ |
|
52 | 61 |
@Override |
53 | 62 |
public void addElement(Media element) { |
54 | 63 |
getEntity().addMedia(element); |
55 | 64 |
} |
56 | 65 |
|
66 |
/** {@inheritDoc} */ |
|
57 | 67 |
@Override |
58 | 68 |
public void removeElement(Media element) { |
59 | 69 |
getEntity().removeMedia(element); |
Also available in: Unified diff
performed javacscript:fix and worked on documentation