Revision 3be6ef3e
Added by Niels Hoffmann over 13 years ago
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/section/supplemental/MediaRepresentationPartSection.java | ||
---|---|---|
13 | 13 |
import eu.etaxonomy.taxeditor.forms.ICdmFormElement; |
14 | 14 |
import eu.etaxonomy.taxeditor.section.AbstractEntityCollectionSection; |
15 | 15 |
|
16 |
/** |
|
17 |
* <p>MediaRepresentationPartSection class.</p> |
|
18 |
* |
|
19 |
* @author n.hoffmann |
|
20 |
* @version $Id: $ |
|
21 |
*/ |
|
16 | 22 |
public class MediaRepresentationPartSection extends |
17 | 23 |
AbstractEntityCollectionSection<MediaRepresentation, MediaRepresentationPart> { |
18 | 24 |
|
19 | 25 |
private static final Logger logger = Logger |
20 | 26 |
.getLogger(MediaRepresentationPartSection.class); |
21 | 27 |
|
28 |
/** |
|
29 |
* <p>Constructor for MediaRepresentationPartSection.</p> |
|
30 |
* |
|
31 |
* @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.forms.CdmFormFactory} object. |
|
32 |
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object. |
|
33 |
* @param parentElement a {@link eu.etaxonomy.taxeditor.forms.ICdmFormElement} object. |
|
34 |
* @param style a int. |
|
35 |
*/ |
|
22 | 36 |
public MediaRepresentationPartSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, |
23 | 37 |
ICdmFormElement parentElement, int style) { |
24 | 38 |
super(cdmFormFactory, conversation, parentElement, "Media Representation Part", style); |
25 | 39 |
} |
26 | 40 |
|
41 |
/** {@inheritDoc} */ |
|
27 | 42 |
@Override |
28 | 43 |
public void addElement(MediaRepresentationPart element) { |
29 | 44 |
getEntity().addRepresentationPart(element); |
30 | 45 |
} |
31 | 46 |
|
47 |
/** {@inheritDoc} */ |
|
32 | 48 |
@Override |
33 | 49 |
public MediaRepresentationPart createNewElement() { |
34 | 50 |
// we are suporting image only at the moment |
35 | 51 |
return ImageFile.NewInstance(null, null); |
36 | 52 |
} |
37 | 53 |
|
54 |
/** {@inheritDoc} */ |
|
38 | 55 |
@Override |
39 | 56 |
public Collection<MediaRepresentationPart> getCollection( |
40 | 57 |
MediaRepresentation entity) { |
41 | 58 |
return getEntity().getParts(); |
42 | 59 |
} |
43 | 60 |
|
61 |
/** {@inheritDoc} */ |
|
44 | 62 |
@Override |
45 | 63 |
public String getEmptyString() { |
46 | 64 |
return "No media representation parts yet."; |
47 | 65 |
} |
48 | 66 |
|
67 |
/** {@inheritDoc} */ |
|
49 | 68 |
@Override |
50 | 69 |
protected String getTooltipString() { |
51 | 70 |
return "Create new media representation part."; |
52 | 71 |
} |
53 | 72 |
|
73 |
/** {@inheritDoc} */ |
|
54 | 74 |
@Override |
55 | 75 |
public void removeElement(MediaRepresentationPart element) { |
56 | 76 |
getEntity().removeRepresentationPart(element); |
Also available in: Unified diff
performed javacscript:fix and worked on documentation