Revision 0908acf3
Added by Andreas Müller over 6 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/TaxonNodeAgentRelationCollectionElement.java | ||
---|---|---|
32 | 32 |
public class TaxonNodeAgentRelationCollectionElement extends AbstractEntityCollectionElement<TaxonNodeAgentRelation> { |
33 | 33 |
|
34 | 34 |
|
35 |
|
|
36 |
|
|
37 | 35 |
/** |
38 | 36 |
* @param formFactory |
39 | 37 |
* @param section |
... | ... | |
45 | 43 |
public TaxonNodeAgentRelationCollectionElement(CdmFormFactory formFactory, AbstractFormSection section, |
46 | 44 |
TaxonNodeAgentRelation entity, SelectionListener removeListener, Color backgroundColor, int style) { |
47 | 45 |
super(formFactory, section, entity, removeListener, backgroundColor, style); |
48 |
|
|
49 |
// TODO Auto-generated constructor stub |
|
50 | 46 |
} |
51 | 47 |
|
52 | 48 |
|
... | ... | |
58 | 54 |
|
59 | 55 |
|
60 | 56 |
|
61 |
|
|
62 |
|
|
63 |
|
|
64 |
|
|
65 | 57 |
@Override |
66 | 58 |
public void setEntity(TaxonNodeAgentRelation entity) { |
67 | 59 |
|
... | ... | |
83 | 75 |
} |
84 | 76 |
} |
85 | 77 |
|
86 |
/* (non-Javadoc) |
|
87 |
* @see eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement#createControls(eu.etaxonomy.taxeditor.ui.element.ICdmFormElement, int) |
|
88 |
*/ |
|
89 | 78 |
@Override |
90 | 79 |
public void createControls(ICdmFormElement element, int style) { |
91 |
combo_relationshipType = formFactory.createDefinedTermComboElement(TermType.TaxonNodeAgentRelationType, element, "Taxon node agent relationtype", null, style);
|
|
80 |
combo_relationshipType = formFactory.createDefinedTermComboElement(TermType.TaxonNodeAgentRelationType, element, "Relation type", null, style);
|
|
92 | 81 |
if (entity != null){ |
93 | 82 |
selection_toPerson = formFactory |
94 | 83 |
.createSelectionElement(TeamOrPersonBase.class, |
... | ... | |
112 | 101 |
|
113 | 102 |
} |
114 | 103 |
|
115 |
|
|
116 | 104 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/TaxonNodeAgentRelationCollectionSection.java | ||
---|---|---|
36 | 36 |
*/ |
37 | 37 |
public TaxonNodeAgentRelationCollectionSection (CdmFormFactory formFactory, ConversationHolder conversation, |
38 | 38 |
ICdmFormElement parentElement, int style) { |
39 |
super(formFactory, conversation, parentElement, "Taxon node agent relation", style);
|
|
39 |
super(formFactory, conversation, parentElement, "Related persons or teams", style);
|
|
40 | 40 |
|
41 | 41 |
} |
42 | 42 |
|
43 |
|
|
44 |
/* (non-Javadoc) |
|
45 |
* @see eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection#getEmptyString() |
|
46 |
*/ |
|
47 | 43 |
@Override |
48 | 44 |
public String getEmptyString() { |
49 |
return "No taxon node agent relations yet.";
|
|
45 |
return "No related persons or teams yet.";
|
|
50 | 46 |
} |
51 | 47 |
|
52 |
/* (non-Javadoc) |
|
53 |
* @see eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection#getTooltipString() |
|
54 |
*/ |
|
55 | 48 |
@Override |
56 | 49 |
protected String getTooltipString() { |
57 |
return "Add a new agent relation to this taxon node.";
|
|
50 |
return "Add a new person/team to this taxon node.";
|
|
58 | 51 |
} |
59 | 52 |
|
60 |
/* (non-Javadoc) |
|
61 |
* @see eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection#getCollection(java.lang.Object) |
|
62 |
*/ |
|
63 | 53 |
@Override |
64 | 54 |
public Collection<TaxonNodeAgentRelation> getCollection(TaxonNode entity) { |
65 | 55 |
//why Do I have to give the method an entity??? |
... | ... | |
67 | 57 |
return allAgentRelationships; |
68 | 58 |
} |
69 | 59 |
|
70 |
/* (non-Javadoc) |
|
71 |
* @see eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection#addElement(java.lang.Object) |
|
72 |
*/ |
|
73 | 60 |
@Override |
74 | 61 |
public void addElement(TaxonNodeAgentRelation element) { |
75 | 62 |
|
76 | 63 |
|
77 | 64 |
} |
78 | 65 |
|
79 |
/* (non-Javadoc) |
|
80 |
* @see eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection#removeElement(java.lang.Object) |
|
81 |
*/ |
|
82 | 66 |
@Override |
83 | 67 |
public void removeElement(TaxonNodeAgentRelation element) { |
84 | 68 |
getEntity().removeNodeAgent(element); |
... | ... | |
86 | 70 |
} |
87 | 71 |
|
88 | 72 |
|
89 |
/* (non-Javadoc) |
|
90 |
* @see eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionSection#createNewElement() |
|
91 |
*/ |
|
92 | 73 |
@Override |
93 | 74 |
public TaxonNodeAgentRelation createNewElement() { |
94 | 75 |
TaxonNodeAgentRelation rel = getEntity().addAgentRelation(null, null); |
Also available in: Unified diff
Adapt labels for taxon node agent relation editing