3 * Copyright (C) 2007 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
7 * The contents of this file are subject to the Mozilla Public License Version 1.1
8 * See LICENSE.TXT at the top of this package for the full license terms.
11 package eu
.etaxonomy
.taxeditor
.ui
.section
.description
;
13 import java
.util
.Collection
;
15 import org
.apache
.log4j
.Logger
;
17 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
18 import eu
.etaxonomy
.cdm
.model
.description
.Scope
;
19 import eu
.etaxonomy
.cdm
.model
.description
.TaxonDescription
;
20 import eu
.etaxonomy
.taxeditor
.ui
.forms
.CdmFormFactory
;
21 import eu
.etaxonomy
.taxeditor
.ui
.forms
.ICdmFormElement
;
22 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractEntityCollectionSection
;
25 * <p>ScopeSection class.</p>
28 * @created Mar 18, 2010
31 public class ScopeSection
extends AbstractEntityCollectionSection
<TaxonDescription
, Scope
> {
34 private static final Logger logger
= Logger
.getLogger(ScopeSection
.class);
37 * <p>Constructor for ScopeSection.</p>
39 * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
40 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
41 * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
44 public ScopeSection(CdmFormFactory cdmFormFactory
, ConversationHolder conversation
, ICdmFormElement parentElement
, int style
) {
45 super(cdmFormFactory
, conversation
, parentElement
, "Scope", style
);
50 public void addElement(Scope element
) {
51 getEntity().addScope(element
);
56 public Scope
createNewElement() {
57 return Scope
.NewInstance();
62 public Collection
<Scope
> getCollection(TaxonDescription entity
) {
63 return entity
.getScopes();
68 public String
getEmptyString() {
69 return "No scopes yet.";
74 protected String
getTooltipString() {
75 return "Create a new scope";
80 public void removeElement(Scope element
) {
81 getEntity().removeScope(element
);