Revision 8481f952
Added by Andreas Müller almost 4 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/MediaRepresentationPartSection.java | ||
---|---|---|
20 | 20 |
* <p>MediaRepresentationPartSection class.</p> |
21 | 21 |
* |
22 | 22 |
* @author n.hoffmann |
23 |
* @version $Id: $ |
|
24 | 23 |
*/ |
25 | 24 |
public class MediaRepresentationPartSection extends |
26 | 25 |
AbstractEntityCollectionSection<MediaRepresentation, MediaRepresentationPart> { |
... | ... | |
39 | 38 |
formFactory.addPropertyChangeListener(this); |
40 | 39 |
} |
41 | 40 |
|
42 |
/** {@inheritDoc} */ |
|
43 | 41 |
@Override |
44 | 42 |
public void addElement(MediaRepresentationPart element) { |
45 | 43 |
getEntity().addRepresentationPart(element); |
46 | 44 |
} |
47 |
|
|
48 |
/** {@inheritDoc} */ |
|
49 | 45 |
@Override |
50 | 46 |
public MediaRepresentationPart createNewElement() { |
51 | 47 |
// FIXME we are supporting image only at the moment |
52 | 48 |
return ImageFile.NewInstance(null, null); |
53 | 49 |
} |
54 | 50 |
|
55 |
/** {@inheritDoc} */ |
|
56 | 51 |
@Override |
57 | 52 |
public Collection<MediaRepresentationPart> getCollection( |
58 | 53 |
MediaRepresentation entity) { |
... | ... | |
64 | 59 |
return new DefaultCdmBaseComparator<>(); |
65 | 60 |
} |
66 | 61 |
|
67 |
/** {@inheritDoc} */ |
|
68 | 62 |
@Override |
69 | 63 |
public String getEmptyString() { |
70 | 64 |
return "No media representation parts yet."; |
71 | 65 |
} |
72 | 66 |
|
73 |
/** {@inheritDoc} */ |
|
74 | 67 |
@Override |
75 | 68 |
protected String getTooltipString() { |
76 | 69 |
return "Create new media representation part."; |
77 | 70 |
} |
78 | 71 |
|
79 |
/** {@inheritDoc} */ |
|
80 | 72 |
@Override |
81 | 73 |
public void removeElement(MediaRepresentationPart element) { |
82 | 74 |
getEntity().removeRepresentationPart(element); |
... | ... | |
94 | 86 |
} |
95 | 87 |
} |
96 | 88 |
|
97 |
/** |
|
98 |
* {@inheritDoc} |
|
99 |
*/ |
|
100 | 89 |
@Override |
101 | 90 |
public MediaRepresentationPart addExisting() { |
102 | 91 |
return null; |
103 | 92 |
} |
104 | 93 |
|
105 |
/** |
|
106 |
* {@inheritDoc} |
|
107 |
*/ |
|
108 | 94 |
@Override |
109 | 95 |
public boolean allowAddExisting() { |
110 | 96 |
return false; |
Also available in: Unified diff
cleanup