Merge branch 'develop' into LibrAlign
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / section / group / GroupSelectionElement.java
1 /**
2 * Copyright (C) 2012 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
5 *
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.
8 */
9 package eu.etaxonomy.taxeditor.ui.section.group;
10
11 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
12 import eu.etaxonomy.cdm.model.common.Group;
13 import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
14 import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
15 import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
16
17 /**
18 * @author a.kohlbecker
19 *
20 */
21 public class GroupSelectionElement extends EntitySelectionElement<Group> {
22
23 public GroupSelectionElement(CdmFormFactory formFactory,
24 ConversationHolder conversation, ICdmFormElement parentElement,
25 String labelString, Group entity, int mode,
26 int style) {
27 super(formFactory, conversation, parentElement, Group.class, labelString, entity,
28 mode, style);
29 }
30
31 /* (non-Javadoc)
32 * @see eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement#getTitle()
33 */
34 @Override
35 protected String getTitle() {
36 if (getEntity() != null) {
37 return getEntity().getName();
38 }
39 return super.getTitle();
40 }
41
42 }