2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.taxeditor
.ui
.section
.description
;
12 import java
.util
.Collection
;
14 import eu
.etaxonomy
.cdm
.api
.conversation
.ConversationHolder
;
15 import eu
.etaxonomy
.cdm
.model
.description
.TaxonDescription
;
16 import eu
.etaxonomy
.cdm
.model
.location
.NamedArea
;
17 import eu
.etaxonomy
.taxeditor
.ui
.element
.CdmFormFactory
;
18 import eu
.etaxonomy
.taxeditor
.ui
.element
.ICdmFormElement
;
19 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractEntityCollectionSection
;
22 * <p>GeoScopeSection class.</p>
25 * @created Sep 17, 2010
28 public class GeoScopeSection
extends AbstractEntityCollectionSection
<TaxonDescription
, NamedArea
> {
31 * <p>Constructor for GeoScopeSection.</p>
33 * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
34 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
35 * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
38 public GeoScopeSection(CdmFormFactory formFactory
,
39 ConversationHolder conversation
, ICdmFormElement parentElement
, int style
) {
40 super(formFactory
, conversation
, parentElement
, "Geo Scope", style
);
45 public Collection
<NamedArea
> getCollection(TaxonDescription entity
) {
46 return entity
.getGeoScopes();
51 public NamedArea
createNewElement() {
52 return NamedArea
.NewInstance();
57 public void addElement(NamedArea element
) {
58 getEntity().addGeoScope(element
);
63 public void removeElement(NamedArea element
) {
64 getEntity().removeGeoScope(element
);
69 public String
getEmptyString() {
70 return "No geo scopes yet.";
75 protected String
getTooltipString() {
76 return "Add a new geo scope.";
83 public NamedArea
addExisting() {
91 public boolean allowAddExisting() {