Revision 3be6ef3e
Added by Niels Hoffmann over 13 years ago
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/section/supplemental/AnnotationSection.java | ||
---|---|---|
16 | 16 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
17 | 17 |
|
18 | 18 |
/** |
19 |
* |
|
19 |
* <p>AnnotationSection class.</p> |
|
20 |
* |
|
20 | 21 |
* @author n.hoffmann |
21 | 22 |
* @created Nov 5, 2009 |
22 | 23 |
* @version 1.0 |
... | ... | |
24 | 25 |
public class AnnotationSection extends AbstractEntityCollectionSection<AnnotatableEntity, Annotation>{ |
25 | 26 |
|
26 | 27 |
/** |
27 |
* @param parentElement |
|
28 |
* @param style |
|
28 |
* <p>Constructor for AnnotationSection.</p> |
|
29 |
* |
|
30 |
* @param parentElement a {@link eu.etaxonomy.taxeditor.forms.ICdmFormElement} object. |
|
31 |
* @param style a int. |
|
32 |
* @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.forms.CdmFormFactory} object. |
|
33 |
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object. |
|
29 | 34 |
*/ |
30 | 35 |
public AnnotationSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, ICdmFormElement parentElement, int style) { |
31 | 36 |
super(cdmFormFactory, conversation, parentElement, "Annotations", style); |
32 | 37 |
} |
33 | 38 |
|
39 |
/** {@inheritDoc} */ |
|
34 | 40 |
@Override |
35 | 41 |
public Annotation createNewElement() { |
36 | 42 |
String text = ""; |
... | ... | |
40 | 46 |
return Annotation.NewInstance(text, type, language); |
41 | 47 |
} |
42 | 48 |
|
49 |
/** {@inheritDoc} */ |
|
43 | 50 |
@Override |
44 | 51 |
public Collection<Annotation> getCollection(AnnotatableEntity entity) { |
45 | 52 |
return entity.getAnnotations(); |
46 | 53 |
} |
47 | 54 |
|
55 |
/** {@inheritDoc} */ |
|
48 | 56 |
@Override |
49 | 57 |
public String getEmptyString() { |
50 | 58 |
return "No annotations yet."; |
51 | 59 |
} |
52 | 60 |
|
61 |
/** {@inheritDoc} */ |
|
53 | 62 |
@Override |
54 | 63 |
protected String getTooltipString() { |
55 | 64 |
return "Create a new annotation"; |
56 | 65 |
} |
57 | 66 |
|
67 |
/** {@inheritDoc} */ |
|
58 | 68 |
@Override |
59 | 69 |
public void addElement(Annotation element) { |
60 | 70 |
getEntity().addAnnotation(element); |
61 | 71 |
} |
62 | 72 |
|
73 |
/** {@inheritDoc} */ |
|
63 | 74 |
@Override |
64 | 75 |
public void removeElement(Annotation element) { |
65 | 76 |
getEntity().removeAnnotation(element); |
Also available in: Unified diff
performed javacscript:fix and worked on documentation