// $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;
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);
}
}