Refactoring selection elements so they can be configured
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / selection / UserSelectionElement.java
index 4ffe93c75571597b453ac641cb63fa0ebf05a124..fc5d27d7201a70021a1dd2746a36ea214566d29b 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;
 
@@ -25,6 +25,8 @@ import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
  */
 public class UserSelectionElement extends AbstractSelectionElement<User> {
 
+       public static final int DEFAULT = NOTHING;
+
        /**
         * @param formFactory
         * @param conversation
@@ -38,22 +40,30 @@ public class UserSelectionElement extends AbstractSelectionElement<User> {
         */
        public UserSelectionElement(CdmFormFactory formFactory,
                        ConversationHolder conversation, ICdmFormElement parentElement,
-                       String labelString, User entity, int style) {
+                       String labelString, User entity, int mode, int style) {
                super(formFactory, conversation, parentElement, labelString, entity,
-                               false, false, false, style);
+                               mode, style);
        }
 
-       /* (non-Javadoc)
-        * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)
+       /*
+        * (non-Javadoc)
+        * 
+        * @see
+        * org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt
+        * .events.SelectionEvent)
         */
        @Override
        public void widgetSelected(SelectionEvent e) {
-               User newSelection = UserSelectionDialog.select(getShell(), getConversationHolder(), entity);
+               User newSelection = UserSelectionDialog.select(getShell(),
+                               getConversationHolder(), entity);
                setSelectionInternal(newSelection);
        }
 
-       /* (non-Javadoc)
-        * @see eu.etaxonomy.taxeditor.ui.selection.AbstractSelectionElement#getTitle()
+       /*
+        * (non-Javadoc)
+        * 
+        * @see
+        * eu.etaxonomy.taxeditor.ui.selection.AbstractSelectionElement#getTitle()
         */
        @Override
        protected String getTitle() {