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
.description
.TaxonDescription
;
17 import eu
.etaxonomy
.cdm
.model
.location
.NamedArea
;
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>GeoScopeSection class.</p>
26 * @created Sep 17, 2010
29 public class GeoScopeSection
extends AbstractEntityCollectionSection
<TaxonDescription
, NamedArea
> {
32 * <p>Constructor for GeoScopeSection.</p>
34 * @param formFactory 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 GeoScopeSection(CdmFormFactory formFactory
,
40 ConversationHolder conversation
, ICdmFormElement parentElement
, int style
) {
41 super(formFactory
, conversation
, parentElement
, "Geo Scope", style
);
46 public Collection
<NamedArea
> getCollection(TaxonDescription entity
) {
47 return entity
.getGeoScopes();
52 public NamedArea
createNewElement() {
53 return NamedArea
.NewInstance();
58 public void addElement(NamedArea element
) {
59 getEntity().addGeoScope(element
);
64 public void removeElement(NamedArea element
) {
65 getEntity().removeGeoScope(element
);
70 public String
getEmptyString() {
71 return "No geo scopes yet.";
76 protected String
getTooltipString() {
77 return "Add a new geo scope.";