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
.TaxonDescription
;
19 import eu
.etaxonomy
.cdm
.model
.location
.NamedArea
;
20 import eu
.etaxonomy
.taxeditor
.ui
.element
.CdmFormFactory
;
21 import eu
.etaxonomy
.taxeditor
.ui
.element
.ICdmFormElement
;
22 import eu
.etaxonomy
.taxeditor
.ui
.section
.AbstractEntityCollectionSection
;
25 * <p>GeoScopeSection class.</p>
28 * @created Sep 17, 2010
31 public class GeoScopeSection
extends AbstractEntityCollectionSection
<TaxonDescription
, NamedArea
> {
34 private static final Logger logger
= Logger
35 .getLogger(GeoScopeSection
.class);
38 * <p>Constructor for GeoScopeSection.</p>
40 * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
41 * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
42 * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
45 public GeoScopeSection(CdmFormFactory formFactory
,
46 ConversationHolder conversation
, ICdmFormElement parentElement
, int style
) {
47 super(formFactory
, conversation
, parentElement
, "Geo Scope", style
);
52 public Collection
<NamedArea
> getCollection(TaxonDescription entity
) {
53 return entity
.getGeoScopes();
58 public NamedArea
createNewElement() {
59 return NamedArea
.NewInstance();
64 public void addElement(NamedArea element
) {
65 getEntity().addGeoScope(element
);
70 public void removeElement(NamedArea element
) {
71 getEntity().removeGeoScope(element
);
76 public String
getEmptyString() {
77 return "No geo scopes yet.";
82 protected String
getTooltipString() {
83 return "Add a new geo scope.";