Revision f81c688d
Added by Katja Luther over 1 year ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/combo/AbstractComboElement.java | ||
---|---|---|
81 | 81 |
|
82 | 82 |
@Override |
83 | 83 |
public void setBackground(Color color) { |
84 |
if (label != null) { |
|
84 |
if (label != null && !label.isDisposed()) {
|
|
85 | 85 |
label.setBackground(color); |
86 | 86 |
} |
87 | 87 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/occurrence/OccurrenceStatusElement.java | ||
---|---|---|
17 | 17 |
import eu.etaxonomy.taxeditor.ui.element.SelectionArbitrator; |
18 | 18 |
import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement; |
19 | 19 |
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement; |
20 |
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection; |
|
20 | 21 |
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement; |
21 | 22 |
import eu.etaxonomy.taxeditor.ui.section.reference.SingleSourceSection; |
22 | 23 |
import eu.etaxonomy.taxeditor.ui.section.supplemental.AbstractOriginalSourceElement; |
... | ... | |
29 | 30 |
|
30 | 31 |
private TermComboElement<DefinedTerm> combo_statusType; |
31 | 32 |
|
32 |
private IdentifiableSourceElement sourceElement; |
|
33 |
// private IdentifiableSourceElement sourceElement;
|
|
33 | 34 |
|
34 | 35 |
|
35 | 36 |
public OccurrenceStatusElement(CdmFormFactory formFactory, AbstractFormSection section, OccurrenceStatus entity, SelectionListener removeListener, int style) { |
36 | 37 |
super(formFactory, section, entity, removeListener, "Status", style); |
38 |
|
|
37 | 39 |
} |
38 | 40 |
|
39 | 41 |
@Override |
... | ... | |
43 | 45 |
DefinedTerm statusType = HibernateProxyHelper.deproxy(entity.getType()); |
44 | 46 |
combo_statusType.setSelection(statusType); |
45 | 47 |
} |
48 |
this.setSourceLabel("Source"); |
|
46 | 49 |
|
47 | 50 |
|
48 | 51 |
} |
... | ... | |
54 | 57 |
setEntity(entity); |
55 | 58 |
} |
56 | 59 |
super.createControls(element, style); |
60 |
this.setSourceLabel("Source"); |
|
57 | 61 |
|
58 | 62 |
} |
59 | 63 |
|
... | ... | |
62 | 66 |
if(eventSource == combo_statusType){ |
63 | 67 |
getEntity().setType(combo_statusType.getSelection()); |
64 | 68 |
} |
69 |
if (getParentElement() instanceof AbstractCdmDetailSection) { |
|
70 |
((AbstractCdmDetailSection<?>) getParentElement()).updateTitle(); |
|
71 |
} |
|
65 | 72 |
|
66 | 73 |
} |
67 | 74 |
|
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/reference/OriginalSourceElement.java | ||
---|---|---|
12 | 12 |
import org.eclipse.jface.util.IPropertyChangeListener; |
13 | 13 |
import org.eclipse.ui.forms.widgets.TableWrapData; |
14 | 14 |
|
15 |
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper; |
|
15 | 16 |
import eu.etaxonomy.cdm.model.common.CdmBase; |
16 | 17 |
import eu.etaxonomy.cdm.model.description.DescriptionElementSource; |
17 | 18 |
import eu.etaxonomy.cdm.model.reference.INomenclaturalReference; |
... | ... | |
69 | 70 |
} |
70 | 71 |
externalLinks = formFactory.createExternalLinksSection(getConversationHolder(), formElement, "Link(s)", StoreUtil.getSectionStyle(ExternalLinksSection.class, DescriptionElementSource.class.getCanonicalName())); |
71 | 72 |
externalLinks.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 3)); |
72 |
externalLinks.setEntity(entity);
|
|
73 |
externalLinks.setEntity(HibernateProxyHelper.deproxy(entity));
|
|
73 | 74 |
externalLinks.setFont(AbstractUtility.getFont(Resources.COLOR_FONT_DEFAULT)); |
74 | 75 |
externalLinks.setEmptySectionString("No links yet."); |
75 | 76 |
|
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/supplemental/AbstractSourcedEntityElement.java | ||
---|---|---|
44 | 44 |
selectionArbitrator = formFactory.createSelectionArbitrator(this); |
45 | 45 |
} |
46 | 46 |
this.isCommonNameReference = isCommonNameReference; |
47 |
|
|
47 | 48 |
|
48 | 49 |
|
49 | 50 |
} |
... | ... | |
68 | 69 |
sourceElement.setEntity(entity.getSource()); |
69 | 70 |
|
70 | 71 |
} |
71 |
|
|
72 |
|
|
72 | 73 |
} |
73 | 74 |
|
74 | 75 |
@Override |
... | ... | |
85 | 86 |
this.label = sourceLabel; |
86 | 87 |
if (sourceElement != null){ |
87 | 88 |
this.sourceElement.getReferenceSelectionElement().setLabel(sourceLabel); |
89 |
this.sourceElement.refresh(); |
|
88 | 90 |
} |
89 | 91 |
} |
90 | 92 |
|
Also available in: Unified diff
ref #9939: fix layout issue