Revision f0b2a32b
Added by Patrick Plitzner about 8 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/AbstractReferencedEntityElement.java | ||
---|---|---|
18 | 18 |
import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection; |
19 | 19 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory; |
20 | 20 |
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement; |
21 |
import eu.etaxonomy.taxeditor.ui.element.ISelectableElement; |
|
22 |
import eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator; |
|
21 | 23 |
import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement; |
22 | 24 |
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement; |
23 | 25 |
import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement; |
... | ... | |
28 | 30 |
* @version 1.0 |
29 | 31 |
*/ |
30 | 32 |
public abstract class AbstractReferencedEntityElement<T extends ReferencedEntityBase> |
31 |
extends AbstractEntityCollectionElement<T> { |
|
33 |
extends AbstractEntityCollectionElement<T> implements ISelectableElement {
|
|
32 | 34 |
|
35 |
private SelectionArbitrator selectionArbitrator; |
|
36 |
|
|
33 | 37 |
protected EntitySelectionElement<Reference> selection_reference; |
34 | 38 |
protected TextWithLabelElement text_referenceDetail; |
35 | 39 |
|
... | ... | |
37 | 41 |
AbstractFormSection section, T entity, |
38 | 42 |
SelectionListener removeListener, int style) { |
39 | 43 |
super(formFactory, section, entity, removeListener, null, style); |
44 |
// make this element selectable |
|
45 |
if(formFactory.getSelectionProvider() != null){ |
|
46 |
selectionArbitrator = formFactory.createSelectionArbitrator(this); |
|
47 |
} |
|
40 | 48 |
} |
41 | 49 |
|
42 | 50 |
/** {@inheritDoc} */ |
... | ... | |
57 | 65 |
selection_reference.setEntity(entity.getCitation()); |
58 | 66 |
text_referenceDetail.setText(entity.getCitationMicroReference()); |
59 | 67 |
} |
68 |
|
|
69 |
@Override |
|
70 |
public SelectionArbitrator getSelectionArbitrator() { |
|
71 |
return selectionArbitrator; |
|
72 |
} |
|
60 | 73 |
|
61 | 74 |
} |
Also available in: Unified diff
Made referenced entities selectabel for supplemental data #4627