addAndAdaptSection(parentElement, section);
return section;
}
-
public DescriptionElementSourceSection createDescriptionElementSourceSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
DescriptionElementSourceSection section = new DescriptionElementSourceSection(this, conversation, parentElement, style);
addAndAdaptSection(parentElement, section);
return section;
}
+ public DescriptionElementSourceSection createDescriptionElementSourceSection(ConversationHolder conversation, ICdmFormElement parentElement, Reference defaultSource, int style){
+ DescriptionElementSourceSection section = new DescriptionElementSourceSection(this, conversation, parentElement, defaultSource, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
public ExtensionSection createExtensionSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
ExtensionSection section = new ExtensionSection(this, conversation, parentElement, style);
} else if (entity instanceof DescriptionElementSource && parentElement.getEntity() instanceof CommonTaxonName) {
element = new CommonNameSourceElement(this, parentElement, (DescriptionElementSource) entity,
removeListener, style);
+ } else if (entity instanceof DescriptionElementSource && parentElement.getEntity() instanceof Distribution) {
+ Composite parent = null;
+ if (parentElement instanceof DescriptionElementSourceSection){
+ parent = ((DescriptionElementSourceSection)parentElement).getParent();
+ }
+ if(parent != null){
+ Composite grandParent = parent.getParent();
+ }
+ element = new DescriptionElementSourceElement(this, parentElement, (DescriptionElementSource) entity,
+ removeListener, style, false);
} else if (entity instanceof DescriptionElementSource) {
element = new DescriptionElementSourceElement(this, parentElement, (DescriptionElementSource) entity,
removeListener, style, false);
- } else if (entity instanceof TaxonNodeAgentRelation) {
+ }else if (entity instanceof TaxonNodeAgentRelation) {
element = new TaxonNodeAgentRelationCollectionElement(this, parentElement, (TaxonNodeAgentRelation) entity,
removeListener,backgroundColor, style);
}