1
|
/**
|
2
|
* Copyright (C) 2007 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
6
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8
|
*/
|
9
|
package eu.etaxonomy.taxeditor.editor.name.container;
|
10
|
|
11
|
import org.eclipse.swt.graphics.Font;
|
12
|
|
13
|
import eu.etaxonomy.cdm.model.taxon.Taxon;
|
14
|
import eu.etaxonomy.taxeditor.editor.EditorUtil;
|
15
|
import eu.etaxonomy.taxeditor.preference.Resources;
|
16
|
|
17
|
/**
|
18
|
* <p>AcceptedNameContainer class.</p>
|
19
|
*
|
20
|
* @author p.ciardelli
|
21
|
* @created 13.01.2009
|
22
|
* @version 1.0
|
23
|
*/
|
24
|
public class AcceptedNameContainer extends AbstractGroupedContainer<Taxon> {
|
25
|
|
26
|
private AcceptedGroup acceptedGroup;
|
27
|
|
28
|
|
29
|
/**
|
30
|
* <p>Constructor for AcceptedNameContainer.</p>
|
31
|
*
|
32
|
* @param editor a {@link eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor} object.
|
33
|
* @param group a {@link eu.etaxonomy.taxeditor.editor.name.container.AbstractGroup} object.
|
34
|
*/
|
35
|
public AcceptedNameContainer(Taxon taxon) {
|
36
|
super(taxon);
|
37
|
}
|
38
|
|
39
|
|
40
|
/**
|
41
|
* <p>initializeComposite</p>
|
42
|
*/
|
43
|
public void initializeComposite(){
|
44
|
setFont(getViewerFont());
|
45
|
|
46
|
initTextViewer();
|
47
|
}
|
48
|
|
49
|
/** {@inheritDoc} */
|
50
|
@Override
|
51
|
protected Font getViewerFont() {
|
52
|
return EditorUtil.getFont(Resources.ACCEPTED_TAXON_FONT);
|
53
|
}
|
54
|
|
55
|
/* (non-Javadoc)
|
56
|
* @see eu.etaxonomy.taxeditor.editor.name.AbstractGroupedContainer#setGroup(eu.etaxonomy.taxeditor.editor.name.AbstractGroup)
|
57
|
*/
|
58
|
public void setGroup(AcceptedGroup group) {
|
59
|
this.acceptedGroup = group;
|
60
|
}
|
61
|
|
62
|
/* (non-Javadoc)
|
63
|
* @see eu.etaxonomy.taxeditor.editor.name.AbstractGroupedContainer#getGroup()
|
64
|
*/
|
65
|
@Override
|
66
|
public AbstractGroup getGroup() {
|
67
|
return acceptedGroup;
|
68
|
}
|
69
|
|
70
|
/** {@inheritDoc} */
|
71
|
@Override
|
72
|
protected void updateNonEditableInfo() {
|
73
|
// not needed
|
74
|
}
|
75
|
|
76
|
|
77
|
@Override
|
78
|
protected void updateIcon() {
|
79
|
setIcon(ACCEPTED_ICON);
|
80
|
}
|
81
|
|
82
|
|
83
|
/* (non-Javadoc)
|
84
|
* @see eu.etaxonomy.taxeditor.editor.name.AbstractGroupedContainer#updateIndent()
|
85
|
*/
|
86
|
@Override
|
87
|
protected void updateIndent() {
|
88
|
setIndent(ACCEPTED_INDENT);
|
89
|
}
|
90
|
|
91
|
}
|