Revision 1e18ca7a
Added by Katja Luther over 7 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/container/MisapplicationContainer.java | ||
---|---|---|
1 | 1 |
/** |
2 | 2 |
* Copyright (C) 2007 EDIT |
3 |
* European Distributed Institute of Taxonomy
|
|
3 |
* European Distributed Institute of Taxonomy |
|
4 | 4 |
* http://www.e-taxonomy.eu |
5 |
*
|
|
5 |
* |
|
6 | 6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
7 | 7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
8 | 8 |
*/ |
... | ... | |
23 | 23 |
* @version 1.0 |
24 | 24 |
*/ |
25 | 25 |
public class MisapplicationContainer extends AbstractGroupedContainer<Taxon> { |
26 |
|
|
26 |
|
|
27 | 27 |
/** |
28 | 28 |
* <p>Constructor for MisapplicationContainer.</p> |
29 | 29 |
* |
... | ... | |
34 | 34 |
public MisapplicationContainer(AbstractGroup group, Taxon misappliedName) { |
35 | 35 |
super(misappliedName); |
36 | 36 |
} |
37 |
|
|
37 |
|
|
38 | 38 |
|
39 | 39 |
/* (non-Javadoc) |
40 | 40 |
* @see eu.etaxonomy.taxeditor.editor.name.NameComposite#initializeComposite() |
... | ... | |
44 | 44 |
protected void initializeComposite() { |
45 | 45 |
setIsDraggable(true); |
46 | 46 |
setFont(getViewerFont()); |
47 |
|
|
48 |
showSec();
|
|
49 |
|
|
47 |
|
|
48 |
showSec(); |
|
49 |
|
|
50 | 50 |
initTextViewer(); |
51 | 51 |
} |
52 | 52 |
|
... | ... | |
54 | 54 |
protected void updateIcon() { |
55 | 55 |
setIcon(MISAPPLIEDNAME_ICON); |
56 | 56 |
} |
57 |
|
|
57 |
|
|
58 | 58 |
private void showSec() { |
59 | 59 |
if (getMisappliedName() == null) { |
60 | 60 |
return; |
61 | 61 |
} |
62 |
|
|
62 |
|
|
63 | 63 |
if (getMisappliedName().getSec() == null) { |
64 | 64 |
setNonEditableInfo("sec. ???", false); |
65 | 65 |
} else { |
66 | 66 |
String title = getMisappliedName().getSec().getTitleCache(); |
67 |
title = title.replace("&", "&&"); |
|
67 | 68 |
setNonEditableInfo("sec. " + title, false); |
68 | 69 |
} |
69 | 70 |
} |
70 |
|
|
71 |
|
|
71 | 72 |
/** |
72 | 73 |
* <p>getMisappliedName</p> |
73 | 74 |
* |
... | ... | |
82 | 83 |
protected Font getViewerFont() { |
83 | 84 |
return EditorUtil.getFont(Resources.MISAPPLIEDNAME_FONT); |
84 | 85 |
} |
85 |
|
|
86 |
|
|
86 | 87 |
/* (non-Javadoc) |
87 | 88 |
* @see eu.etaxonomy.taxeditor.editor.name.container.AbstractGroupedContainer#showAnnotations() |
88 | 89 |
*/ |
... | ... | |
94 | 95 |
} |
95 | 96 |
super.showAnnotations(); |
96 | 97 |
} |
97 |
|
|
98 |
|
|
98 | 99 |
|
99 | 100 |
/** {@inheritDoc} */ |
100 | 101 |
@Override |
Also available in: Unified diff
fix #5646