} else if (entity instanceof FeatureStateDto && parentElement instanceof OnlyApplicableIfEntityCollectionSection) {
element = new OnlyApplicableIfCollectionElementForDto(this, parentElement, (FeatureStateDto) entity, removeListener, backgroundColor, style);
}else if (entity instanceof OccurrenceStatus) {
- element = new OccurrenceStatusElement(this, parentElement, (OccurrenceStatus) entity, removeListener, backgroundColor, style);
+ element = new OccurrenceStatusElement(this, parentElement, (OccurrenceStatus)entity, removeListener, style);
}
//check for parent section when entity is null
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.SelectionArbitrator;
import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
import eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement;
+import eu.etaxonomy.taxeditor.ui.section.reference.SingleSourceSection;
+import eu.etaxonomy.taxeditor.ui.section.supplemental.AbstractOriginalSourceElement;
+import eu.etaxonomy.taxeditor.ui.section.supplemental.AbstractSingleSourceElement;
+import eu.etaxonomy.taxeditor.ui.section.supplemental.AbstractSourcedEntityBaseElement;
+import eu.etaxonomy.taxeditor.ui.section.supplemental.AbstractSourcedEntityElement;
+import eu.etaxonomy.taxeditor.ui.section.supplemental.IdentifiableSourceElement;
-public class OccurrenceStatusElement extends AbstractEntityCollectionElement<OccurrenceStatus>{
+public class OccurrenceStatusElement extends AbstractSourcedEntityElement<OccurrenceStatus>{
private TermComboElement<DefinedTerm> combo_statusType;
-
- public OccurrenceStatusElement(CdmFormFactory formFactory, AbstractFormSection section,
- OccurrenceStatus entity, SelectionListener removeListener, Color backgroundColor, int style) {
- super(formFactory, section, entity, removeListener, backgroundColor, style);
+ private IdentifiableSourceElement sourceElement;
+
-
+ public OccurrenceStatusElement(CdmFormFactory formFactory, AbstractFormSection section, OccurrenceStatus entity, SelectionListener removeListener, int style) {
+ super(formFactory, section, entity, removeListener, "Status", style);
}
@Override
public void setEntity(OccurrenceStatus entity) {
- this.entity = entity;
+ super.setEntity(entity);
if (combo_statusType != null){
DefinedTerm statusType = HibernateProxyHelper.deproxy(entity.getType());
- combo_statusType.setSelection(statusType);
-
+ combo_statusType.setSelection(statusType);
}
+
}
@Override
if (entity != null){
setEntity(entity);
}
+ super.createControls(element, style);
}
@Override
public void handleEvent(Object eventSource) {
if(eventSource == combo_statusType){
- entity.setType(combo_statusType.getSelection());
+ getEntity().setType(combo_statusType.getSelection());
}
}
+ @Override
+ public SelectionArbitrator getSelectionArbitrator() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
}