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 eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
16 import eu
.etaxonomy
.cdm
.model
.common
.DefinedTerm
;
17 import eu
.etaxonomy
.cdm
.model
.description
.TaxonDescription
;
18 import eu
.etaxonomy
.taxeditor
.ui
.element
.CdmFormFactory
;
19 import eu
.etaxonomy
.taxeditor
.ui
.element
.ICdmFormElement
;
20 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractEntityCollectionSection
;
23 * <p>ScopeSection class.</p>
26 * @created Mar 18, 2010
29 public class ScopeSection
extends AbstractEntityCollectionSection
<TaxonDescription
, DefinedTerm
> {
32 * <p>Constructor for ScopeSection.</p>
34 * @param cdmFormFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
35 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
36 * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
39 public ScopeSection(CdmFormFactory cdmFormFactory
, ConversationHolder conversation
, ICdmFormElement parentElement
, int style
) {
40 super(cdmFormFactory
, conversation
, parentElement
, "Scope", style
);
45 public void addElement(DefinedTerm element
) {
46 getEntity().addScope(element
);
51 public DefinedTerm
createNewElement() {
52 return DefinedTerm
.NewInstance();
57 public Collection
<DefinedTerm
> getCollection(TaxonDescription entity
) {
58 return entity
.getScopes();
63 public String
getEmptyString() {
64 return "No scopes yet.";
69 protected String
getTooltipString() {
70 return "Create a new scope";
75 public void removeElement(DefinedTerm element
) {
76 getEntity().removeScope(element
);