import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Section;
import org.eclipse.ui.internal.forms.widgets.FormFonts;
+import org.joda.time.DateTime;
import org.joda.time.Partial;
import org.springframework.security.core.GrantedAuthority;
import eu.etaxonomy.cdm.model.common.ICdmBase;
import eu.etaxonomy.cdm.model.common.IEnumTerm;
import eu.etaxonomy.cdm.model.common.IdentifiableSource;
+import eu.etaxonomy.cdm.model.common.Identifier;
+import eu.etaxonomy.cdm.model.common.LSID;
import eu.etaxonomy.cdm.model.common.Language;
import eu.etaxonomy.cdm.model.common.LanguageString;
import eu.etaxonomy.cdm.model.common.Marker;
import eu.etaxonomy.cdm.model.description.Feature;
import eu.etaxonomy.cdm.model.description.IndividualsAssociation;
import eu.etaxonomy.cdm.model.description.KeyStatement;
+import eu.etaxonomy.cdm.model.description.MeasurementUnit;
import eu.etaxonomy.cdm.model.description.QuantitativeData;
+import eu.etaxonomy.cdm.model.description.State;
import eu.etaxonomy.cdm.model.description.StateData;
+import eu.etaxonomy.cdm.model.description.StatisticalMeasure;
import eu.etaxonomy.cdm.model.description.StatisticalMeasurementValue;
import eu.etaxonomy.cdm.model.description.TaxonInteraction;
import eu.etaxonomy.cdm.model.description.TextData;
import eu.etaxonomy.cdm.model.media.MediaRepresentation;
import eu.etaxonomy.cdm.model.media.MediaRepresentationPart;
import eu.etaxonomy.cdm.model.media.Rights;
+import eu.etaxonomy.cdm.model.molecular.DnaSample;
import eu.etaxonomy.cdm.model.name.NameRelationship;
import eu.etaxonomy.cdm.model.name.NameTypeDesignation;
import eu.etaxonomy.cdm.model.name.NomenclaturalStatus;
import eu.etaxonomy.taxeditor.model.MessagingUtils;
import eu.etaxonomy.taxeditor.ui.combo.EnumComboElement;
import eu.etaxonomy.taxeditor.ui.combo.TermComboElement;
+import eu.etaxonomy.taxeditor.ui.combo.VocabularyComboElement;
import eu.etaxonomy.taxeditor.ui.element.MinMaxTextSection.UnitType;
-import eu.etaxonomy.taxeditor.ui.mvc.OriginalLabelDataController;
-import eu.etaxonomy.taxeditor.ui.mvc.OriginalLabelDataElement;
+import eu.etaxonomy.taxeditor.ui.mvc.element.DateElement;
import eu.etaxonomy.taxeditor.ui.openurl.IOpenUrlEnabled;
import eu.etaxonomy.taxeditor.ui.openurl.OpenUrlSelectorElement;
import eu.etaxonomy.taxeditor.ui.password.EditPasswordElement;
import eu.etaxonomy.taxeditor.ui.section.group.GroupDetailSection;
import eu.etaxonomy.taxeditor.ui.section.group.MemberDetailElement;
import eu.etaxonomy.taxeditor.ui.section.group.MemberDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.key.GeographicalScopeDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.identifier.IdentifierDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.identifier.IdentifierDetailSection;
import eu.etaxonomy.taxeditor.ui.section.key.PolytomousKeyDetailElement;
import eu.etaxonomy.taxeditor.ui.section.key.PolytomousKeyDetailSection;
import eu.etaxonomy.taxeditor.ui.section.key.PolytomousKeyNodeDetailElement;
import eu.etaxonomy.taxeditor.ui.section.key.ScopeRestrictionSection;
import eu.etaxonomy.taxeditor.ui.section.key.TaxonomicScopeSection;
import eu.etaxonomy.taxeditor.ui.section.media.ImageFileElement;
-import eu.etaxonomy.taxeditor.ui.section.media.MediaMetaElement;
import eu.etaxonomy.taxeditor.ui.section.media.MediaDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.media.MediaMetaElement;
import eu.etaxonomy.taxeditor.ui.section.media.MediaRepresentationElement;
import eu.etaxonomy.taxeditor.ui.section.media.MediaRepresentationPartElement;
import eu.etaxonomy.taxeditor.ui.section.media.MediaRepresentationPartSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.CurrentDeterminationDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.DerivedUnitBaseDetailElement;
import eu.etaxonomy.taxeditor.ui.section.occurrence.DerivedUnitBaseDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.DerivedUnitFacadeDetailElement;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.DerivedUnitFacadeDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.DerivedUnitGeneralDetailElement;
import eu.etaxonomy.taxeditor.ui.section.occurrence.DerivedUnitGeneralDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.DeterminationDetailElement;
import eu.etaxonomy.taxeditor.ui.section.occurrence.FieldUnitGeneralDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.GatheringEventDetailElement;
import eu.etaxonomy.taxeditor.ui.section.occurrence.GatheringEventDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.GeoScopeDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.NamedAreaDetailElement;
import eu.etaxonomy.taxeditor.ui.section.occurrence.OriginalLabelDataSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.SourceCollectionDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.SpecimenCollectionDetailElement;
import eu.etaxonomy.taxeditor.ui.section.occurrence.SpecimenCollectionDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.SpecimenHierarchyDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.SpecimenHierarchyDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.association.TaxonAssociationDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.association.TaxonAssociationDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.derivedUnit.PreservedSpecimenCurrentDeterminationDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.derivedUnit.PreservedSpecimenDetailElement;
import eu.etaxonomy.taxeditor.ui.section.occurrence.derivedUnit.PreservedSpecimenDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.derivedUnit.PreservedSpecimenGeneralDetailElement;
import eu.etaxonomy.taxeditor.ui.section.occurrence.derivedUnit.PreservedSpecimenGeneralDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.derivedUnit.PreservedSpecimenSourceCollectionDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.AbstractSampleDesignationDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.AmplificationCloningDetailElement;
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.AmplificationCloningDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.AmplificationGelPhotoCollectionDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.AmplificationGeneralDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.AmplificationPrimerDetailElement;
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.AmplificationPrimerDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.CurrentSampleDesignationDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.DnaQualityDetailElement;
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.DnaQualityDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.DnaSampleGeneralDetailElement;
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.DnaSampleGeneralDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.DnaSamplePreparationPreservationDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.DnaSamplePreparationPreservationSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.PrimerGeneralDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SampleDesignationDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SampleDesignationDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SampleDesignationHistoryDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SampleDesignationTextDetailElement;
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SequenceContigFileCollectionDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SequenceGeneralDetailElement;
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SequenceGeneralDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.SingleReadPherogramCollectionDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.TissueSampleGeneralDetailElement;
import eu.etaxonomy.taxeditor.ui.section.occurrence.dna.TissueSampleGeneralDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.media.LivingPlantPhotoGeneralDetailElement;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.media.LivingPlantPhotoGeneralDetailSection;
import eu.etaxonomy.taxeditor.ui.section.occurrence.media.MediaSpecimenGeneralDetailElement;
import eu.etaxonomy.taxeditor.ui.section.occurrence.media.MediaSpecimenGeneralDetailSection;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.media.SpecimenScanGeneralDetailElement;
-import eu.etaxonomy.taxeditor.ui.section.occurrence.media.SpecimenScanGeneralDetailSection;
import eu.etaxonomy.taxeditor.ui.section.reference.NomenclaturalReferenceDetailElement;
import eu.etaxonomy.taxeditor.ui.section.reference.NomenclaturalReferenceDetailSection;
import eu.etaxonomy.taxeditor.ui.section.reference.ReferenceDetailElement;
import eu.etaxonomy.taxeditor.ui.section.vocabulary.DefinedTermDetailElement;
import eu.etaxonomy.taxeditor.ui.section.vocabulary.DefinedTermDetailSection;
import eu.etaxonomy.taxeditor.ui.section.vocabulary.FeatureDetailElement;
+import eu.etaxonomy.taxeditor.ui.section.vocabulary.MeasurementUnitCollectionElement;
+import eu.etaxonomy.taxeditor.ui.section.vocabulary.MeasurementUnitCollectionSection;
import eu.etaxonomy.taxeditor.ui.section.vocabulary.NamedAreaDetailSection;
+import eu.etaxonomy.taxeditor.ui.section.vocabulary.RecommendedModifierVocabulariesCollectionSection;
+import eu.etaxonomy.taxeditor.ui.section.vocabulary.RecommendedModifierVocabulariesElement;
+import eu.etaxonomy.taxeditor.ui.section.vocabulary.StateVocabularyCollectionElement;
+import eu.etaxonomy.taxeditor.ui.section.vocabulary.StateVocabularyCollectionSection;
+import eu.etaxonomy.taxeditor.ui.section.vocabulary.StatisticalMeasureCollectionElement;
+import eu.etaxonomy.taxeditor.ui.section.vocabulary.StatisticalMeasureCollectionSection;
import eu.etaxonomy.taxeditor.ui.section.vocabulary.TermVocabularyDetailElement;
import eu.etaxonomy.taxeditor.ui.section.vocabulary.TermVocabularyDetailSection;
import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
+import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElementWithAbbreviatedTitle;
import eu.etaxonomy.taxeditor.ui.selection.NomenclaturalAuthorTeamSelectionElement;
import eu.etaxonomy.taxeditor.ui.selection.TaxonNodeSelectionElement;
return this.createLabel(parent, null);
}
- /**
- * <p>
- * createMultilineTextWithLabel
- * </p>
- *
- * @param labelString
- * a {@link java.lang.String} object.
- * @param textHeight
- * a int.
- * @param style
- * a int.
- * @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
- * object.
- * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
- * object.
- */
- public TextWithLabelElement createMultilineTextWithLabel(ICdmFormElement parentElement, String labelString,
- int textHeight, int style) {
- TextWithLabelElement element = new TextWithLabelElement(this, parentElement, labelString, "", textHeight, style);
- adapt(element);
- parentElement.addElement(element);
- return element;
- }
-
/**
* <p>
* createMultiLanguageTextElement
initialText = "";
}
- TextWithLabelElement element = new TextWithLabelElement(this, parentElement, labelString, initialText, null, textLimit, style);
+ TextWithLabelElement element = new TextWithLabelElement(this, parentElement, labelString, initialText, null,
+ textLimit, style);
+ adapt(element);
+ parentElement.addElement(element);
+ return element;
+ }
+
+ public TextWithLabelElement createMultiLineTextWithLabel(ICdmFormElement parentElement, String labelString,
+ int textHeight, int style) {
+ TextWithLabelElement element = new TextWithLabelElement(this, parentElement, labelString, "", textHeight, true, style);
+ adapt(element);
+ parentElement.addElement(element);
+ return element;
+ }
+
+ public LsidWithExceptionLabelElement createLsidWithExceptionLabelElement(ICdmFormElement parentElement, String labelString,
+ LSID initialLsid, int style) {
+ LsidWithExceptionLabelElement element = new LsidWithExceptionLabelElement(this, parentElement, labelString, initialLsid, null, style);
adapt(element);
parentElement.addElement(element);
return element;
return element;
}
- /**
- * <p>
- * createLanguageStringWithLabelElement
- * </p>
- *
- * @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
- * object.
- * @param labelString
- * a {@link java.lang.String} object.
- * @param languageString
- * a {@link eu.etaxonomy.cdm.model.common.LanguageString} object.
- * @param style
- * a int.
- * @return a
- * {@link eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement}
- * object.
- */
public LanguageStringWithLabelElement createLanguageStringWithLabelElement(ICdmFormElement parentElement,
String labelString, LanguageString languageString, int style) {
- LanguageStringWithLabelElement element = new LanguageStringWithLabelElement(this, parentElement, labelString,
- languageString, style);
- adapt(element);
- parentElement.addElement(element);
- return element;
+ return createLanguageStringWithLabelElement(parentElement, labelString, languageString, null, false, style);
}
- /**
- * <p>
- * createLanguageStringWithLabelElement
- * </p>
- *
- * @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
- * object.
- * @param labelString
- * a {@link java.lang.String} object.
- * @param languageString
- * a {@link eu.etaxonomy.cdm.model.common.LanguageString} object.
- * @param height
- * a int.
- * @param style
- * a int.
- * @return a
- * {@link eu.etaxonomy.taxeditor.ui.element.LanguageStringWithLabelElement}
- * object.
- */
public LanguageStringWithLabelElement createLanguageStringWithLabelElement(ICdmFormElement parentElement,
- String labelString, LanguageString languageString, int height, int style) {
+ String labelString, LanguageString languageString, Integer height, boolean isMultiLine, int style) {
LanguageStringWithLabelElement element = new LanguageStringWithLabelElement(this, parentElement, labelString,
- languageString, height, style);
- adapt(element);
- parentElement.addElement(element);
- return element;
- }
-
- /**
- * <p>
- * createTextElement
- * </p>
- *
- * @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
- * object.
- * @param initialText
- * a {@link java.lang.String} object.
- * @param style
- * a int.
- * @return a {@link eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement}
- * object.
- */
- public TextWithLabelElement createTextElement(ICdmFormElement parentElement, String initialText, int style) {
- TextWithLabelElement element = new TextWithLabelElement(this, parentElement, null, initialText, null, style);
+ languageString, height, isMultiLine, style);
adapt(element);
parentElement.addElement(element);
return element;
parentElement.addElement(element);
return element;
}
-
/**
- * <p>
- * createTermComboElement
- * </p>
- *
* @deprecated Use {@link #createDefinedTermComboElement(TermType, ICdmFormElement, String, DefinedTermBase, int)} instead
- * @param termComboType
- * a
- * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
- * object.
- * @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
- * object.
- * @param labelString
- * a {@link java.lang.String} object.
- * @param selection
- * a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
- * object.
- * @param style
- * a int.
- * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
- * object.
*/
@Deprecated
public <T extends DefinedTermBase> TermComboElement<T> createTermComboElement(Class<T> termComboType,
ICdmFormElement parentElement, String labelString, T selection, int style) {
TermComboElement<T> element = new TermComboElement<T>(this, parentElement, termComboType, labelString,
- selection, style);
+ selection, true, style);
adapt(element);
parentElement.addElement(element);
return element;
}
- /**
- * <p>
- * createTermComboElement
- * </p>
- *
- * @param termComboType
- * a
- * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
- * object.
- * @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
- * object.
- * @param labelString
- * a {@link java.lang.String} object.
- * @param selection
- * a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
- * object.
- * @param style
- * a int.
- * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
- * object.
- */
+ public <T extends DefinedTermBase> TermComboElement<T> createDefinedTermComboElement(
+ TermType termType,
+ ICdmFormElement parentElement,
+ String labelString,
+ T selection,
+ int style) {
+ TermComboElement<T> element = new TermComboElement<T>(this, parentElement, termType, labelString, selection, true, style);
+ adapt(element);
+ parentElement.addElement(element);
+ return element;
+ }
- public <T extends DefinedTermBase> TermComboElement<T> createDefinedTermComboElement(
+ public <T extends DefinedTermBase> TermComboElement<T> createDefinedTermComboElement(
TermType termType,
ICdmFormElement parentElement,
String labelString,
T selection,
+ boolean addEmptyElement,
int style) {
- TermComboElement<T> element = new TermComboElement<T>(this, parentElement, termType, labelString, selection, style);
+ TermComboElement<T> element = new TermComboElement<T>(this, parentElement, termType, labelString, selection, addEmptyElement, style);
adapt(element);
parentElement.addElement(element);
return element;
}
- /**
- * <p>
- * createTermComboElement
- * </p>
- *
- * @param termComboType
- * a
- * {@link eu.eu.etaxonomy.taxeditor.ui.element.CdmFormFactory.TermComboType}
- * object.
- * @param parentElement
- * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
- * object.
- * @param labelString
- * a {@link java.lang.String} object.
- * @param selection
- * a {@link eu.etaxonomy.cdm.model.common.DefinedTermBase}
- * object.
- * @param style
- * a int.
- * @return a {@link eu.etaxonomy.taxeditor.ui.combo.TermComboElement}
- * object.
- */
+ public <T extends DefinedTermBase> TermComboElement<T> createDefinedTermComboElement(
+ TermVocabulary<?> termVocabulary,
+ ICdmFormElement parentElement,
+ String labelString,
+ T selection,
+ int style) {
+ TermComboElement<T> element = new TermComboElement<T>(this, parentElement, termVocabulary, labelString, selection, true, style);
+ adapt(element);
+ parentElement.addElement(element);
+ return element;
+ }
public <T extends DefinedTermBase> TermComboElement<T> createDefinedTermComboElement(
TermVocabulary<?> termVocabulary,
ICdmFormElement parentElement,
String labelString,
T selection,
+ boolean addEmptyElement,
int style) {
- TermComboElement<T> element = new TermComboElement<T>(this, parentElement, termVocabulary, labelString, selection, style);
+ TermComboElement<T> element = new TermComboElement<T>(this, parentElement, termVocabulary, labelString, selection, addEmptyElement, style);
adapt(element);
parentElement.addElement(element);
return element;
return element;
}
+ public <TERM extends DefinedTermBase<TERM>, VOC extends TermVocabulary<TERM>> VocabularyComboElement<TERM, VOC> createVocabularyComboElement(
+ TermType termType, String label, VOC selection, ICdmFormElement parentElement, int style) {
+ VocabularyComboElement<TERM, VOC> element = new VocabularyComboElement<TERM, VOC>(this, parentElement, termType, label, selection, style);
+ adapt(element);
+ parentElement.addElement(element);
+ return element;
+ }
+
/**
* <p>
* createBrowserElement
* object.
* @return a {@link eu.etaxonomy.taxeditor.ui.section.EmptyElement} object.
*/
- public EmptyElement createEmptyElement(ICdmFormElement parentElement) {
- EmptyElement element = new EmptyElement(this, parentElement, null, SWT.NULL);
+ public EmptyElement createEmptyElement(ICdmFormElement parentElement, String emptyText) {
+ EmptyElement element = new EmptyElement(this, parentElement, emptyText, SWT.NULL);
adapt(element);
parentElement.addElement(element);
return element;
return section;
}
- public DerivedUnitFacadeDetailSection createDerivedUnitFacadeDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
- DerivedUnitFacadeDetailSection section = new DerivedUnitFacadeDetailSection(this, conversation, parentElement, selectionProvider, style);
- addAndAdaptSection(parentElement, section);
- return section;
- }
-
public FieldUnitDetailSection createFieldUnitDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
FieldUnitDetailSection section = new FieldUnitDetailSection(this, conversation, parentElement, selectionProvider, style);
addAndAdaptSection(parentElement, section);
return section;
}
+ public SpecimenHierarchyDetailSection createSpecimenHierarchyDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ SpecimenHierarchyDetailSection section = new SpecimenHierarchyDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
public DerivedUnitBaseDetailSection createDerivedUnitBaseDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
DerivedUnitBaseDetailSection section = new DerivedUnitBaseDetailSection(this, conversation, parentElement, selectionProvider, style);
addAndAdaptSection(parentElement, section);
return section;
}
+ public TaxonAssociationDetailSection createTaxonAssociationDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ TaxonAssociationDetailSection section = new TaxonAssociationDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
public OriginalLabelDataSection createOriginalLabelDataSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
OriginalLabelDataSection section = new OriginalLabelDataSection(this, conversation, parentElement, selectionProvider, style);
addAndAdaptSection(parentElement, section);
return section;
}
+ public DnaSamplePreparationPreservationSection createDnaSamplePreparationPreservationSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ DnaSamplePreparationPreservationSection section = new DnaSamplePreparationPreservationSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
public DnaQualityDetailSection createDnaQualityDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
DnaQualityDetailSection section = new DnaQualityDetailSection(this, conversation, parentElement, selectionProvider, style);
addAndAdaptSection(parentElement, section);
return section;
}
- public SpecimenScanGeneralDetailSection createSpecimenScanGeneralDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
- SpecimenScanGeneralDetailSection section = new SpecimenScanGeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
- addAndAdaptSection(parentElement, section);
- return section;
- }
-
- public LivingPlantPhotoGeneralDetailSection createLivingPlantPhotoGeneralDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
- LivingPlantPhotoGeneralDetailSection section = new LivingPlantPhotoGeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
- addAndAdaptSection(parentElement, section);
- return section;
- }
-
public MediaSpecimenGeneralDetailSection createMediaSpecimenGeneralDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
MediaSpecimenGeneralDetailSection section = new MediaSpecimenGeneralDetailSection(this, conversation, parentElement, selectionProvider, style);
addAndAdaptSection(parentElement, section);
return section;
}
+ public SampleDesignationDetailSection createSampleDesignationDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ SampleDesignationDetailSection section = new SampleDesignationDetailSection(this, conversation, parentElement, selectionProvider, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
public PreservedSpecimenDeterminationDetailSection createPreservedSpecimenDeterminationDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
PreservedSpecimenDeterminationDetailSection section = new PreservedSpecimenDeterminationDetailSection(this, conversation, parentElement, selectionProvider, style);
addAndAdaptSection(parentElement, section);
return element;
}
- public DerivedUnitFacadeDetailElement createDerivedUnitFacadeDetailElement(ICdmFormElement parentElement){
- DerivedUnitFacadeDetailElement element = new DerivedUnitFacadeDetailElement(this, parentElement);
- addAndAdaptElement(parentElement, element);
- return element;
- }
-
public NonViralNameDetailElement createNonViralNameDetailElement(ICdmFormElement parentElement){
NonViralNameDetailElement element = new NonViralNameDetailElement(this, parentElement);
addAndAdaptElement(parentElement, element);
return element;
}
+ public TaxonAssociationDetailElement createTaxonAssociationDetailElement(ICdmFormElement parentElement){
+ TaxonAssociationDetailElement element = new TaxonAssociationDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
public PreservedSpecimenGeneralDetailElement createPreservedSpecimenGeneralDetailElement(ICdmFormElement parentElement){
PreservedSpecimenGeneralDetailElement element = new PreservedSpecimenGeneralDetailElement(this, parentElement);
addAndAdaptElement(parentElement, element);
return element;
}
+ public DnaSamplePreparationPreservationDetailElement createDnaSamplePreparationPreservationDetailElement(ICdmFormElement parentElement){
+ DnaSamplePreparationPreservationDetailElement element = new DnaSamplePreparationPreservationDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
public DnaQualityDetailElement createDnaQualityDetailElement(ICdmFormElement parentElement){
DnaQualityDetailElement element = new DnaQualityDetailElement(this, parentElement);
addAndAdaptElement(parentElement, element);
return element;
}
- public SpecimenScanGeneralDetailElement createSpecimenScanGeneralDetailElement(ICdmFormElement parentElement){
- SpecimenScanGeneralDetailElement element = new SpecimenScanGeneralDetailElement(this, parentElement);
- addAndAdaptElement(parentElement, element);
- return element;
- }
-
- public LivingPlantPhotoGeneralDetailElement createLivingPlantPhotoGeneralDetailElement(ICdmFormElement parentElement){
- LivingPlantPhotoGeneralDetailElement element = new LivingPlantPhotoGeneralDetailElement(this, parentElement);
- addAndAdaptElement(parentElement, element);
- return element;
- }
-
public MediaSpecimenGeneralDetailElement createMediaSpecimenGeneralDetailElement(ICdmFormElement parentElement){
MediaSpecimenGeneralDetailElement element = new MediaSpecimenGeneralDetailElement(this, parentElement);
addAndAdaptElement(parentElement, element);
return element;
}
+ public SpecimenHierarchyDetailElement createSpecimenHierarchyDetailElement(ICdmFormElement parentElement) {
+ SpecimenHierarchyDetailElement element = new SpecimenHierarchyDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
public DerivedUnitBaseDetailElement createDerivedUnitBaseDetailElement(ICdmFormElement parentElement) {
DerivedUnitBaseDetailElement element = new DerivedUnitBaseDetailElement(this, parentElement);
return element;
}
+ public OriginalLabelDataElement createOriginalLabelDataElement(ICdmFormElement parentElement) {
+ OriginalLabelDataElement element = new OriginalLabelDataElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
public PreservedSpecimenDetailElement createPreservedSpecimenDetailElement(ICdmFormElement parentElement) {
PreservedSpecimenDetailElement element = new PreservedSpecimenDetailElement(this, parentElement);
addAndAdaptElement(parentElement, element);
return element;
}
+ public SampleDesignationDetailElement createSampleDesignationDetailElement(ICdmFormElement parentElement) {
+ SampleDesignationDetailElement element = new SampleDesignationDetailElement(this, parentElement);
+ addAndAdaptElement(parentElement, element);
+ return element;
+ }
+
/**
* @param parentElement
* @param element
return section;
}
+ public StateVocabularyCollectionSection createStateVocabulariesSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ StateVocabularyCollectionSection section = new StateVocabularyCollectionSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public RecommendedModifierVocabulariesCollectionSection createRecommendedModifierVocabulariesCollectionSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ RecommendedModifierVocabulariesCollectionSection section = new RecommendedModifierVocabulariesCollectionSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public MeasurementUnitCollectionSection createMeasurementUnitCollectionSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ MeasurementUnitCollectionSection section = new MeasurementUnitCollectionSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public StatisticalMeasureCollectionSection createStatisticalMeasureCollectionSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ StatisticalMeasureCollectionSection section = new StatisticalMeasureCollectionSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
public CollectingAreasDetailSection createCollectingAreasDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
CollectingAreasDetailSection section = new CollectingAreasDetailSection(this, conversation, parentElement, style);
addAndAdaptSection(parentElement, section);
return section;
}
+ public GeoScopeDetailSection createGeoScopeDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ GeoScopeDetailSection section = new GeoScopeDetailSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public IdentifierDetailSection createIdentifierDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ IdentifierDetailSection section = new IdentifierDetailSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
+ public CurrentSampleDesignationDetailSection createCurrentSampleDesignationDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ CurrentSampleDesignationDetailSection section = new CurrentSampleDesignationDetailSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
public CurrentDeterminationDetailSection createCurrentDeterminationDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
CurrentDeterminationDetailSection section = new CurrentDeterminationDetailSection(this, conversation, parentElement, style);
addAndAdaptSection(parentElement, section);
return section;
}
+ public SampleDesignationHistoryDetailSection createSampleDesignationHistoryDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
+ SampleDesignationHistoryDetailSection section = new SampleDesignationHistoryDetailSection(this, conversation, parentElement, style);
+ addAndAdaptSection(parentElement, section);
+ return section;
+ }
+
public DeterminationHistoryDetailSection createDeterminationHistoryDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
DeterminationHistoryDetailSection section = new DeterminationHistoryDetailSection(this, conversation, parentElement, style);
addAndAdaptSection(parentElement, section);
return section;
}
- public GeographicalScopeDetailSection createGeographicalScopeDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
- GeographicalScopeDetailSection section = new GeographicalScopeDetailSection(this, conversation, parentElement, style);
- addAndAdaptSection(parentElement, section);
- return section;
- }
-
public ScopeRestrictionSection createScopeRestrictionSection(ConversationHolder conversation, ICdmFormElement parentElement, int style){
ScopeRestrictionSection section = new ScopeRestrictionSection(this, conversation, parentElement, style);
addAndAdaptSection(parentElement, section);
return section;
}
- /**
- * <p>
- * createEntityCollectionElement
- * </p>
- *
- * @param removeListener
- * a {@link org.eclipse.swt.events.SelectionListener} object.
- * @param style
- * a int.
- * @param parentElement
- * a
- * {@link eu.etaxonomy.taxeditor.ui.element.AbstractFormSection}
- * object.
- * @param versionableEntity
- * a {@link eu.etaxonomy.cdm.model.common.IVersionableEntity}
- * object.
- * @param backgroundColor
- * a {@link org.eclipse.swt.graphics.Color} object.
- * @return a
- * {@link eu.etaxonomy.taxeditor.ui.section.AbstractEntityCollectionElement}
- * object.
- */
public AbstractEntityCollectionElement createEntityCollectionElement(AbstractFormSection parentElement,
Object versionableEntity, SelectionListener removeListener, Color backgroundColor, int style) {
AbstractEntityCollectionElement element = null;
} else if (entity instanceof Marker) {
element = new MarkerElement(this, parentElement, (Marker) entity, removeListener, style);
} else if (entity instanceof Media) {
- element = new MediaMetaElement(this, parentElement, (Media) entity, removeListener, style);
+ element = new MediaMetaElement(this, parentElement, (Media) entity, removeListener, true, style);
} else if (entity instanceof MediaRepresentation) {
element = new MediaRepresentationElement(this, parentElement, (MediaRepresentation) entity, removeListener,
style);
} else if (entity instanceof IdentifiableSource) {
element = new IdentifiableSourceElement(this, parentElement, (IdentifiableSource) entity, removeListener,
style);
- } else if (entity instanceof DefinedTerm) {
- switch(((DefinedTerm)entity).getTermType()) {
- case Scope:
- element = new ScopeElement(this,
- parentElement,
- (DefinedTerm) entity,
- removeListener,
- style);
- break;
- case Modifier:
- element = new ModifierElement(this,
- parentElement,
- (DefinedTerm) entity,
- removeListener,
- style);
- break;
- default:
- //FIXME : Actually we should through an exception here
- element = null;
- break;
-
- }
+ } else if (entity instanceof DefinedTerm) {
+ switch(((DefinedTerm)entity).getTermType()) {
+ case Scope:
+ element = new ScopeElement(this,
+ parentElement,
+ (DefinedTerm) entity,
+ removeListener,
+ style);
+ break;
+ case Modifier:
+ element = new ModifierElement(this,
+ parentElement,
+ (DefinedTerm) entity,
+ removeListener,
+ style);
+ break;
+ default:
+ break;
+
+ }
} else if (entity instanceof Reference) {
if(parentElement instanceof SequenceReferenceCollectionDetailSection){
element = new SequenceReferenceCollectionDetailElement(this, parentElement, (Reference) entity, removeListener, style);
element = new StatisticalMeasurementValueElement(this, parentElement, (StatisticalMeasurementValue) entity,
removeListener, style);
} else if (entity instanceof DerivedUnit) {
- switch(((DerivedUnit)entity).getRecordBasis()) {
- case LivingSpecimen:
- case PreservedSpecimen:
- case OtherSpecimen:
- element = new SpecimenCollectionDetailElement(this,
- parentElement,
- (DerivedUnit) entity,
- removeListener,
- style);
- break;
- default:
- element = new DerivedUnitElement(this,
- parentElement,
- (DerivedUnit) entity,
- removeListener,
- style);
- }
+ switch(((DerivedUnit)entity).getRecordBasis()) {
+ case LivingSpecimen:
+ case PreservedSpecimen:
+ case OtherSpecimen:
+ element = new SpecimenCollectionDetailElement(this,
+ parentElement,
+ (DerivedUnit) entity,
+ removeListener,
+ style);
+ break;
+ default:
+ element = new DerivedUnitElement(this,
+ parentElement,
+ (DerivedUnit) entity,
+ removeListener,
+ style);
+ }
} else if (entity instanceof NamedArea) {
element = new NamedAreaDetailElement(this, parentElement, (NamedArea) entity, removeListener, style);
if (descriptionElement.getFeature().equals(Feature.PROTOLOGUE())) {
element = new ProtologueElement(this, parentElement, descriptionElement, removeListener, style);
}
+ } else if (entity instanceof Identifier) {
+ if(parentElement instanceof AbstractSampleDesignationDetailSection){
+ element = new SampleDesignationTextDetailElement(this, parentElement, (Identifier<DnaSample>) entity, removeListener, backgroundColor, style);
+ }
+ else{
+ element = new IdentifierDetailElement(this, parentElement, (Identifier) entity, removeListener, style);
+ }
+ } else if (entity instanceof TermVocabulary) {
+ TermVocabulary<?> termVocabulary = (TermVocabulary<?>)entity;
+ switch (termVocabulary.getTermType()) {
+ case State:
+ element = new StateVocabularyCollectionElement(this, parentElement, (TermVocabulary<State>) entity, removeListener, backgroundColor, style);
+ break;
+ case Modifier:
+ element = new RecommendedModifierVocabulariesElement(this, parentElement, (TermVocabulary<DefinedTerm>) entity, removeListener, backgroundColor, style);
+ break;
+ default:
+ break;
+ }
+ } else if (entity instanceof MeasurementUnit) {
+ element = new MeasurementUnitCollectionElement(this, parentElement, (MeasurementUnit) entity, removeListener, backgroundColor, style);
+ } else if (entity instanceof StatisticalMeasure) {
+ element = new StatisticalMeasureCollectionElement(this, parentElement, (StatisticalMeasure) entity, removeListener, backgroundColor, style);
}
if (element == null) {
return element;
}
+ /**
+ * <p>
+ * Creates a selection element for the given type T which shows only the <b>abbreviated</b> title as the label.
+ * </p>
+ * <p>
+ * <strong>Selection elements not handled by this method:</strong>
+ * <ul>
+ * <li>{@link TaxonNodeSelectionElement} see
+ * {@link #createTaxonNodeSelectionElement(ConversationHolder, ICdmFormElement, String, TaxonNode, int, int)}
+ * </li>
+ * <li>{@link NomenclaturalAuthorTeamSelectionElement} see
+ * {@link #createNomenclaturalAuthorTeamSelectionElement(ConversationHolder, ICdmFormElement, String, Team, int, int)}
+ * </li>
+ * </ul>
+ * </p>
+ *
+ * @param clazz
+ * a {@link Class} object of the type that you want the selection
+ * element to handle
+ * @param parentElement
+ * a {@link ICdmFormElement} object.
+ * @param labelString
+ * a {@link String} object.
+ * @param selectionType
+ * @param selection
+ * a {@link ICdmBase} object.
+ * @param style
+ * a int.
+ * @param conversation
+ * a {@link ConversationHolder} object.
+ * @return a {@link EntitySelectionElement} object.
+ */
+ public <T extends ICdmBase> EntitySelectionElementWithAbbreviatedTitle<T> createSelectionElementWithAbbreviatedTitle(
+ Class<T> clazz, ConversationHolder conversation, ICdmFormElement parentElement, String labelString,
+ T selection, int mode, int style) {
+ EntitySelectionElementWithAbbreviatedTitle<T> element = new EntitySelectionElementWithAbbreviatedTitle<T>(this, conversation, parentElement, clazz,
+ labelString, selection, mode, style);
+ adapt(element);
+ parentElement.addElement(element);
+ return element;
+ }
+
public TaxonNodeSelectionElement createTaxonNodeSelectionElement(ConversationHolder conversation,
ICdmFormElement parentElement, String labelString, TaxonNode selection, int mode, int style) {
TaxonNodeSelectionElement element = new TaxonNodeSelectionElement(this, conversation, parentElement,
return labelElement;
}
+ public DateElement createDateElement(ICdmFormElement formElement, String labelText, DateTime dateTime, int style){
+ Label label = new Label(formElement.getLayoutComposite(), style);
+ label.setText(labelText+" (yyyy-MM-dd)");
+ DateElement dateElement = new DateElement(formElement.getLayoutComposite(), dateTime, style);
+ dateElement.initController(this, formElement);
+ return dateElement;
+ }
+
/**
* <p>
* Getter for the field <code>selectionProvider</code>.
return section;
}
- /**
- * @param parentElement
- * @return
- */
- public OriginalLabelDataController createOriginalLabelDataController(AbstractCdmDetailSection<DerivedUnitFacade> parentElement) {
- OriginalLabelDataElement originalLabelDataElement = new OriginalLabelDataElement(parentElement.getLayoutComposite(), SWT.NONE);
- originalLabelDataElement.initController(this, parentElement);
- return originalLabelDataElement.getController();
- }
-
}