/**
- *
+ *
*/
package eu.etaxonomy.taxeditor.ui.section.description.detail;
-import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
import eu.etaxonomy.cdm.model.description.CategoricalData;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
-import eu.etaxonomy.taxeditor.ui.forms.CheckboxElement;
-import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EntityDetailType;
+import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.CheckboxElement;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
+import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
import eu.etaxonomy.taxeditor.ui.section.description.StateDataSection;
/**
private CheckboxElement checkbox_orderRelevant;
private StateDataSection section_stateData;
-
+
/**
* <p>Constructor for CategoricalDataDetailElement.</p>
*
- * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory} object.
- * @param formElement a {@link eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement} object.
+ * @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
+ * @param formElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param entity a {@link eu.etaxonomy.cdm.model.description.CategoricalData} object.
* @param style a int.
*/
protected void createControls(ICdmFormElement formElement,
CategoricalData entity, int style) {
checkbox_orderRelevant = formFactory.createCheckbox(formElement, "Order Relevant", entity.getOrderRelevant(), style);
- section_stateData = (StateDataSection) formFactory.createEntityDetailSection(EntityDetailType.STATE_DATA, getConversationHolder(), formElement, Section.TWISTIE | Section.EXPANDED);
+ section_stateData = formFactory.createStateDataSection(getConversationHolder(), formElement, ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED);
section_stateData.setEntity(entity);
- section_stateData.setLayoutData(CdmFormFactory.FILL_HORIZONTALLY(2, 1));
- }
-
- /** {@inheritDoc} */
- @Override
- public void setEntity(CategoricalData entity) {
-// section_stateData.setEntity(entity);
- super.setEntity(entity);
+ section_stateData.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
}
/* (non-Javadoc)