Revision 3be6ef3e
Added by Niels Hoffmann over 13 years ago
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/section/description/DescriptionSourceSection.java | ||
---|---|---|
23 | 23 |
import eu.etaxonomy.taxeditor.section.AbstractEntityCollectionSection; |
24 | 24 |
|
25 | 25 |
/** |
26 |
* <p>DescriptionSourceSection class.</p> |
|
27 |
* |
|
26 | 28 |
* @author n.hoffmann |
27 | 29 |
* @created Mar 18, 2010 |
28 | 30 |
* @version 1.0 |
... | ... | |
32 | 34 |
private static final Logger logger = Logger |
33 | 35 |
.getLogger(DescriptionSourceSection.class); |
34 | 36 |
|
37 |
/** |
|
38 |
* <p>Constructor for DescriptionSourceSection.</p> |
|
39 |
* |
|
40 |
* @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.forms.CdmFormFactory} object. |
|
41 |
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object. |
|
42 |
* @param parentElement a {@link eu.etaxonomy.taxeditor.forms.ICdmFormElement} object. |
|
43 |
* @param style a int. |
|
44 |
*/ |
|
35 | 45 |
public DescriptionSourceSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, |
36 | 46 |
ICdmFormElement parentElement, int style) { |
37 | 47 |
super(cdmFormFactory, conversation, parentElement, "Description Sources", style); |
... | ... | |
39 | 49 |
|
40 | 50 |
|
41 | 51 |
|
52 |
/** {@inheritDoc} */ |
|
42 | 53 |
@Override |
43 | 54 |
public void addElement(ReferenceBase element) { |
44 | 55 |
getEntity().addDescriptionSource(element); |
45 | 56 |
} |
46 | 57 |
|
58 |
/** {@inheritDoc} */ |
|
47 | 59 |
@Override |
48 | 60 |
public ReferenceBase createNewElement() { |
49 | 61 |
return new ReferenceFactory().newGeneric(); |
50 | 62 |
} |
51 | 63 |
|
64 |
/** {@inheritDoc} */ |
|
52 | 65 |
@Override |
53 | 66 |
public Collection<ReferenceBase> getCollection(DescriptionBase entity) { |
54 | 67 |
return entity.getDescriptionSources(); |
55 | 68 |
} |
56 | 69 |
|
70 |
/** {@inheritDoc} */ |
|
57 | 71 |
@Override |
58 | 72 |
public String getEmptyString() { |
59 | 73 |
return "No description sources yet."; |
60 | 74 |
} |
61 | 75 |
|
76 |
/** {@inheritDoc} */ |
|
62 | 77 |
@Override |
63 | 78 |
protected String getTooltipString() { |
64 | 79 |
return "Add a reference as source for this description"; |
65 | 80 |
} |
66 | 81 |
|
82 |
/** {@inheritDoc} */ |
|
67 | 83 |
@Override |
68 | 84 |
public void removeElement(ReferenceBase element) { |
69 | 85 |
getEntity().removeDescriptionSource(element); |
Also available in: Unified diff
performed javacscript:fix and worked on documentation