c55072a1c8aeca362e3d4e9005867ae0f66af6de
[taxeditor.git] / taxeditor-editor / src / main / java / eu / etaxonomy / taxeditor / editor / name / AcceptedNameContainer.java
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;
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 /**
27 * <p>Constructor for AcceptedNameContainer.</p>
28 *
29 * @param editor a {@link eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor} object.
30 * @param group a {@link eu.etaxonomy.taxeditor.editor.name.AbstractGroup} object.
31 */
32 public AcceptedNameContainer(TaxonNameEditor editor, AbstractGroup group) {
33 super(editor, group, editor.getTaxon());
34 }
35
36
37 /**
38 * <p>initializeComposite</p>
39 */
40 public void initializeComposite(){
41 setFont(getViewerFont());
42
43 initTextViewer();
44 }
45
46 /** {@inheritDoc} */
47 @Override
48 protected Font getViewerFont() {
49 return EditorUtil.getFont(Resources.ACCEPTED_TAXON_FONT);
50 }
51
52
53
54 /** {@inheritDoc} */
55 @Override
56 protected void updateNonEditableInfo() {
57 // not needed
58 }
59
60
61 @Override
62 protected void updateIcon() {
63 setIcon(ACCEPTED_ICON);
64 }
65
66
67 /* (non-Javadoc)
68 * @see eu.etaxonomy.taxeditor.editor.name.AbstractGroupedContainer#updateIndent()
69 */
70 @Override
71 protected void updateIndent() {
72 setIndent(ACCEPTED_INDENT);
73 }
74
75 }