1 |
3be6ef3e
|
n.hoffmann
|
/**
|
2 |
|
|
*
|
3 |
|
|
*/
|
4 |
|
|
package eu.etaxonomy.taxeditor.labels;
|
5 |
|
|
|
6 |
|
|
import org.eclipse.swt.graphics.Image;
|
7 |
|
|
|
8 |
|
|
import eu.etaxonomy.cdm.model.name.NameRelationshipType;
|
9 |
|
|
|
10 |
|
|
/**
|
11 |
|
|
* <p>ZoologicalNameLabelStrategy class.</p>
|
12 |
|
|
*
|
13 |
|
|
* @author p.ciardelli
|
14 |
|
|
* @version $Id: $
|
15 |
|
|
*/
|
16 |
|
|
public class ZoologicalNameLabelStrategy extends DefaultLabelStrategy {
|
17 |
|
|
|
18 |
|
|
/* (non-Javadoc)
|
19 |
|
|
* @see eu.etaxonomy.taxeditor.editor.labels.IEditorLabelStrategy#getNameRelationTypeLabel(eu.etaxonomy.cdm.model.name.NameRelationshipType)
|
20 |
|
|
*/
|
21 |
|
|
/** {@inheritDoc} */
|
22 |
|
|
public String getNameRelationTypeLabel(NameRelationshipType type) {
|
23 |
|
|
if (type.equals(NameRelationshipType.BASIONYM())) {
|
24 |
|
|
return "original combination for";
|
25 |
|
|
}
|
26 |
|
|
return super.getNameRelationTypeLabel(type);
|
27 |
|
|
}
|
28 |
|
|
|
29 |
|
|
/** {@inheritDoc} */
|
30 |
|
|
public Image getNameRelationTypeImage(NameRelationshipType type) {
|
31 |
|
|
if (NameRelationshipType.BASIONYM().equals(type)) {
|
32 |
|
|
return null;
|
33 |
|
|
}
|
34 |
|
|
return super.getNameRelationTypeImage(type);
|
35 |
|
|
}
|
36 |
|
|
|
37 |
|
|
/* (non-Javadoc)
|
38 |
|
|
* @see eu.etaxonomy.taxeditor.labels.ILabelImageStrategy#getNameRelationDescription(eu.etaxonomy.cdm.model.name.NameRelationshipType)
|
39 |
|
|
*/
|
40 |
|
|
/** {@inheritDoc} */
|
41 |
|
|
public String getNameRelationTypeDescription(NameRelationshipType type) {
|
42 |
|
|
if (NameRelationshipType.BASIONYM().equals(type)) {
|
43 |
|
|
return "Original Combination";
|
44 |
|
|
}
|
45 |
|
|
return super.getNameRelationTypeDescription(type);
|
46 |
|
|
}
|
47 |
|
|
}
|