Revision 9e0f8df5
Added by Patrick Plitzner over 8 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/TaxonBaseDetailSection.java | ||
---|---|---|
20 | 20 |
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection; |
21 | 21 |
|
22 | 22 |
/** |
23 |
* <p>TaxonBaseDetailSection class.</p> |
|
24 |
* |
|
25 | 23 |
* @author n.hoffmann |
26 | 24 |
* @created Nov 4, 2009 |
27 | 25 |
* @version 1.0 |
28 | 26 |
*/ |
29 | 27 |
public class TaxonBaseDetailSection extends AbstractCdmDetailSection<TaxonBase> { |
30 | 28 |
|
31 |
/** |
|
32 |
* <p>Constructor for TaxonBaseDetailSection.</p> |
|
33 |
* |
|
34 |
* @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object. |
|
35 |
* @param style a int. |
|
36 |
* @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object. |
|
37 |
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object. |
|
38 |
* @param selectionProvider a {@link org.eclipse.jface.viewers.ISelectionProvider} object. |
|
39 |
*/ |
|
40 | 29 |
public TaxonBaseDetailSection(CdmFormFactory cdmFormFactory, ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style) { |
41 | 30 |
super(cdmFormFactory, conversation, parentElement, selectionProvider, style); |
42 | 31 |
} |
... | ... | |
47 | 36 |
return getEntity() != null ? getEntity().getClass().getSimpleName() : "TaxonBase"; |
48 | 37 |
} |
49 | 38 |
|
50 |
/* (non-Javadoc) |
|
51 |
* @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#createCdmDetailElement(eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection, int) |
|
52 |
*/ |
|
53 | 39 |
@Override |
54 | 40 |
protected AbstractCdmDetailElement<TaxonBase> createCdmDetailElement(AbstractCdmDetailSection<TaxonBase> parentElement, int style) { |
55 | 41 |
return formFactory.createTaxonBaseDetailElement(parentElement, style); |
56 | 42 |
} |
57 | 43 |
|
58 |
/* (non-Javadoc) |
|
59 |
* @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection#setSectionTitle() |
|
60 |
*/ |
|
61 |
@Override |
|
62 |
protected void setSectionTitle() { |
|
63 |
super.setSectionTitle(); |
|
64 |
String title = getText(); |
|
65 |
// we have to duplicate ampersands otherwise they are treated as |
|
66 |
// mnenomic (see Label.setText() documentation) |
|
67 |
// see also #4302 |
|
68 |
title = title.replace("&", "&&"); |
|
69 |
setText(title); |
|
70 |
} |
|
71 |
|
|
72 | 44 |
} |
Also available in: Unified diff
Handle ampersand correctly in section titles (#5142)