protected void createControls(ICdmFormElement formElement, OriginalSourceBase entity, int style) {
Display display = Display.getCurrent();
Color background = display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND);
+ text_originaleNameString = formFactory.createTextWithLabelElement(
+ formElement, "Original Information", entity != null?entity.getOriginalNameString():null, SWT.NULL);
+ text_originaleNameString.setBackground(background);
if (PreferencesUtil.getBooleanValue(PreferencePredicate.ShowNamespaceInSource.getKey())){
text_idNamespace = formFactory.createTextWithLabelElement(formElement, "ID Namespace", entity != null?entity.getIdNamespace():null, style);
text_idInSource.setBackground(background);
}
-
- text_originaleNameString = formFactory.createTextWithLabelElement(
- formElement, "Original Information", entity != null?entity.getOriginalNameString():null, SWT.NULL);
-
- text_originaleNameString.setBackground(background);
Label label = formFactory.createEmptyCell(getLayoutComposite());
}
protected void createControls(ICdmFormElement formElement, OriginalSourceBase entity, int style) {
Display display = Display.getCurrent();
Color background = display.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND);
+ text_originaleNameString = formFactory.createTextWithLabelElement(
+ formElement, "Original Information", entity != null?entity.getOriginalNameString():null, SWT.NULL);
+
+ text_originaleNameString.setBackground(background);
+
if (entity instanceof DescriptionElementSource){
select_nameUsedInSource = formFactory.createSelectionElement(TaxonName.class, formElement, "Name in Source", entity != null? ((DescriptionElementSource)entity).getNameUsedInSource(): null, EntitySelectionElement.DELETABLE, style);
select_nameUsedInSource.setBackground(background);
}
- text_originaleNameString = formFactory.createTextWithLabelElement(
- formElement, "Original Information", entity != null?entity.getOriginalNameString():null, SWT.NULL);
-
- text_originaleNameString.setBackground(background);
-
-
-
-// externalLinks = formFactory.createExternalLinksSection(getConversationHolder(), formElement, StoreUtil.getSectionStyle(ExternalLinksSection.class, DescriptionElementSource.class.getCanonicalName()));
-// externalLinks.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 3));
-// externalLinks.setEntity(entity);
-//
-// externalLinks.setBackground(background);
-// addControl(externalLinks);
-// addElement(externalLinks);
}
@Override
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
-import eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement;
import eu.etaxonomy.taxeditor.ui.section.common.ExternalLinksSection;
import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElementWithAbbreviatedTitle;
public class NomenclaturalSourceElement extends OriginalSourceElement {
private EntitySelectionElementWithAbbreviatedTitle<Reference> selection_NomRef;
-
-// protected EntitySelectionElement<Reference> selection_Ref;
-// protected TextWithLabelElement microReference;
-// protected OriginalSourceAdvancedSection advancedSection;
protected String label = "Source";
protected CdmBase cdmEntity;
- protected TextWithLabelElement text_idInSource;
- protected TextWithLabelElement text_idNamespace;
- protected TextWithLabelElement text_originaleNameString;
- protected TextWithLabelElement text_cdmsource;
protected EntitySelectionElement<TaxonName> select_nameUsedInSource;
-
protected ExternalLinksSection externalLinks;
}
microReference = formFactory.createTextWithLabelElement(formElement, "Details", entity != null? entity.getCitationMicroReference(): "", style);
-// microReference.setIndent(15);
Label sep = formFactory.createLabel(formElement.getLayoutComposite(), "");
sep.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
select_nameUsedInSource = formFactory.createSelectionElement(TaxonName.class, formElement, "Original Spelling", entity != null? ((DescriptionElementSource)entity).getNameUsedInSource(): null, EntitySelectionElement.ALL, style);
externalLinks = formFactory.createExternalLinksSection(getConversationHolder(), formElement, "Protologue/Original Publication", StoreUtil.getSectionStyle(ExternalLinksSection.class, DescriptionElementSource.class.getCanonicalName()));
+ externalLinks.setEmptySectionString("No protologue yet.");
externalLinks.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 3));
externalLinks.setEntity(entity);
externalLinks.setFont(AbstractUtility.getFont(Resources.COLOR_FONT_DEFAULT));
- externalLinks.setEmptySectionString("No protologue yet.");
+
addControl(externalLinks);
addElement(externalLinks);
advancedSection.setFont(AbstractUtility.getFont(Resources.COLOR_FONT_DEFAULT));
addControl(advancedSection);
addElement(advancedSection);
-
-
this.getLayoutComposite().layout();
}