AT: commiting latest changes to the Palm Use data extension
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / selection / AgentSelectionElement.java
index 12e8721cbad037200a7f25b8cd2a659d10bb5b10..62afd68917e7db713f4f3575882dd25fbdc8ccc2 100644 (file)
@@ -1,12 +1,12 @@
 // $Id$
 /**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy 
-* http://www.e-taxonomy.eu
-* 
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
+ * Copyright (C) 2007 EDIT
+ * European Distributed Institute of Taxonomy 
+ * http://www.e-taxonomy.eu
+ 
+ * The contents of this file are subject to the Mozilla Public License Version 1.1
+ * See LICENSE.TXT at the top of this package for the full license terms.
+ */
 
 package eu.etaxonomy.taxeditor.ui.selection;
 
@@ -19,34 +19,51 @@ import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
 import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
 
 /**
- * <p>AgentSelectionElement class.</p>
- *
+ * <p>
+ * AgentSelectionElement class.
+ * </p>
+ * 
  * @author n.hoffmann
  * @created Jun 22, 2010
  * @version 1.0
  */
 public class AgentSelectionElement extends AbstractSelectionElement<AgentBase> {
 
+       public static final int DEFAULT = EDITABLE | SELECTABLE | DELETABLE;
+
        /**
-        * <p>Constructor for AgentSelectionElement.</p>
-        *
-        * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
-        * @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
-        * @param parentElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
-        * @param labelString a {@link java.lang.String} object.
-        * @param entity a {@link eu.etaxonomy.cdm.model.agent.AgentBase} object.
-        * @param style a int.
+        * <p>
+        * Constructor for AgentSelectionElement.
+        * </p>
+        * 
+        * @param formFactory
+        *            a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+        *            object.
+        * @param conversation
+        *            a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder}
+        *            object.
+        * @param parentElement
+        *            a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement}
+        *            object.
+        * @param labelString
+        *            a {@link java.lang.String} object.
+        * @param entity
+        *            a {@link eu.etaxonomy.cdm.model.agent.AgentBase} object.
+        * @param style
+        *            a int.
         */
-       public AgentSelectionElement(CdmFormFactory formFactory, ConversationHolder conversation,
-                       ICdmFormElement parentElement, String labelString,
-                       AgentBase entity, int style) {
+       public AgentSelectionElement(CdmFormFactory formFactory,
+                       ConversationHolder conversation, ICdmFormElement parentElement,
+                       String labelString, AgentBase entity, int mode, int style) {
                super(formFactory, conversation, parentElement, labelString, entity,
-                               true, true, true, style);
+                               mode, style);
        }
-       
+
        /** {@inheritDoc} */
+       @Override
        public void widgetSelected(SelectionEvent e) {
-               AgentBase newSelection = AgentSelectionDialog.select(getShell(), getConversationHolder(), entity);
+               AgentBase newSelection = AgentSelectionDialog.select(getShell(),
+                               getConversationHolder(), entity);
                setSelectionInternal(newSelection);
        }
 }