/**
- *
+ *
*/
package eu.etaxonomy.taxeditor.ui.section.supplemental;
import org.eclipse.swt.events.SelectionListener;
import eu.etaxonomy.cdm.model.agent.AgentBase;
+import eu.etaxonomy.cdm.model.common.TermType;
import eu.etaxonomy.cdm.model.media.Rights;
-import eu.etaxonomy.cdm.model.media.RightsTerm;
+import eu.etaxonomy.cdm.model.media.RightsType;
import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
-import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.TextWithLabelElement;
+import eu.etaxonomy.taxeditor.ui.element.AbstractFormSection;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.AbstractSelectionElement;
-import eu.etaxonomy.taxeditor.ui.selection.AgentSelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
* <p>
* RightsElement class.
* </p>
- *
+ *
* @author n.hoffmann
* @created Nov 16, 2009
* @version 1.0
*/
public class RightsElement extends AbstractEntityCollectionElement<Rights> {
+ private TermComboElement<RightsType> combo_rightsType;
+ private EntitySelectionElement<AgentBase> selection_agent;
+ private TextWithLabelElement text;
+
/**
* <p>
* Constructor for RightsElement.
* </p>
- *
+ *
* @param formElement
- * a {@link eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
* object.
* @param element
* a {@link eu.etaxonomy.cdm.model.media.Rights} object.
* @param style
* a int.
* @param cdmFormFactory
- * a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory}
+ * a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory}
* object.
*/
public RightsElement(CdmFormFactory cdmFormFactory,
super(cdmFormFactory, formElement, element, removeListener, null, style);
}
- private TermComboElement<RightsTerm> combo_rightsType;
- private AbstractSelectionElement<AgentBase> selection_agent;
- private TextWithLabelElement text;
/*
* (non-Javadoc)
- *
+ *
* @see
* eu.etaxonomy.taxeditor.forms.entitysections.AbstractEntitySetElementComposite
* #createControls(org.eclipse.swt.widgets.Composite, int)
/** {@inheritDoc} */
@Override
public void createControls(ICdmFormElement element, int style) {
- combo_rightsType = formFactory.createTermComboElement(
- RightsTerm.class, this, "Rights Type", null, style);
+ combo_rightsType = formFactory.createDefinedTermComboElement(TermType.RightsType, this, "Rights Type", null, style);
selection_agent = formFactory.createSelectionElement(
- SelectionType.AGENT, getConversationHolder(), this, "Agent",
- null, AgentSelectionElement.DEFAULT, style);
- text = formFactory.createMultilineTextWithLabel(this, "Text", 100,
+ AgentBase.class, getConversationHolder(), this, "Agent",
+ null, EntitySelectionElement.ALL, style);
+ text = formFactory.createMultiLineTextWithLabel(this, "Text", 100,
style);
}
/*
* (non-Javadoc)
- *
+ *
* @see
* eu.etaxonomy.taxeditor.forms.entitysections.AbstractEntitySetElementComposite
* #setElement(eu.etaxonomy.cdm.model.common.VersionableEntity)
/*
* (non-Javadoc)
- *
+ *
* @see
* eu.etaxonomy.taxeditor.section.AbstractEntityCollectionElement#handleEvent
* (java.lang.Object)