import eu.etaxonomy.taxeditor.store.CdmStore;
/**
- * <p>NewFieldObservationWizard class.</p>
+ * <p>NewFieldUnitWizard class.</p>
*
* @author n.hoffmann
* @created Jun 17, 2010
package eu.etaxonomy.taxeditor.preference;
import eu.etaxonomy.cdm.model.common.IDefinedTerm;
+import eu.etaxonomy.cdm.model.occurrence.FieldUnit;
/**
* <p>IPreferenceKeys interface.</p>
public static final String OPENURL_IMAGE_MAX_HEIGHT = "eu.etaxonomy.taxeditor.openUrlImageMaxHeight";
/**
- * Whether the occurrence bulk editor should show {@link FieldObservation} objects
+ * Whether the occurrence bulk editor should show {@link FieldUnit} objects
*/
- public static final String BULK_EDITOR_OCCURRENCE_SHOW_FIELD_OBSERVATIONS = "eu.etaxonomy.taxeditor.bulkeditor.occurrence.showFieldObservations";
+ public static final String BULK_EDITOR_OCCURRENCE_SHOW_FIELD_UNITS = "eu.etaxonomy.taxeditor.bulkeditor.occurrence.showFieldUnits";
public static final String SEARCH_OPEN_RESULTS_IN_SEPARATE_WINDOWS = "eu.etaxonomy.taxeditor.navigation.search.openResultInSeparateWindows";
addField(new BooleanFieldEditor(
IPreferenceKeys.SHOW_EXPERIMENTAL_FEATURES,
"Show experimental features", getFieldEditorParent()));
- addField(new BooleanFieldEditor(IPreferenceKeys.BULK_EDITOR_OCCURRENCE_SHOW_FIELD_OBSERVATIONS,
- "Show FieldObservations in Bulk Editor.",
+ addField(new BooleanFieldEditor(IPreferenceKeys.BULK_EDITOR_OCCURRENCE_SHOW_FIELD_UNITS,
+ "Show Field Units in Bulk Editor.",
getFieldEditorParent()));
addField(new BooleanFieldEditor(IPreferenceKeys.SEARCH_OPEN_RESULTS_IN_SEPARATE_WINDOWS,
"Open search results in separate windows",
*/
public List<SpecimenOrObservationBase> findOccurrences(IIdentifiableEntityServiceConfigurator configurator){
// by default we do not show field units. This may be configured via preferences
- boolean showFieldUnits = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.BULK_EDITOR_OCCURRENCE_SHOW_FIELD_OBSERVATIONS);
+ boolean showFieldUnits = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.BULK_EDITOR_OCCURRENCE_SHOW_FIELD_UNITS);
if(! showFieldUnits){
configurator.setClazz(DerivedUnit.class);
}
import eu.etaxonomy.taxeditor.store.StoreUtil;
/**
- * <p>FilteredFieldObservationSelectionDialog class.</p>
+ * <p>FilteredFieldUnitSelectionDialog class.</p>
*
* @author n.hoffmann
* @created Jun 17, 2010
}
/**
- * <p>Constructor for FilteredFieldObservationSelectionDialog.</p>
+ * <p>Constructor for FilteredFieldUnitSelectionDialog.</p>
*
* @param shell a {@link org.eclipse.swt.widgets.Shell} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
* @param title a {@link java.lang.String} object.
* @param multi a boolean.
* @param settings a {@link java.lang.String} object.
- * @param cdmObject a {@link eu.etaxonomy.cdm.model.occurrence.FieldObservation} object.
+ * @param cdmObject a {@link eu.etaxonomy.cdm.model.occurrence.FieldUnit} object.
*/
protected FieldUnitSelectionDialog(Shell shell, ConversationHolder conversation,
String title, boolean multi, String settings,
return section;
}
- public FieldUnitDetailSection createFieldObservationDetailSection(ConversationHolder conversation, ICdmFormElement parentElement, ISelectionProvider selectionProvider, int style){
+ 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;
return element;
}
- public FieldUnitDetailElement createFieldObservationDetailElement(ICdmFormElement parentElement) {
+ public FieldUnitDetailElement createFieldUnitDetailElement(ICdmFormElement parentElement) {
FieldUnitDetailElement element = new FieldUnitDetailElement(this, parentElement);
addAndAdaptElement(parentElement, element);
return element;
private GeneralDetailSection section_general;
private GatheringEventDetailSection section_gatheringEvent;
private DerivedUnitBaseDetailSection section_derivedUnitBase;
- private FieldUnitDetailSection section_fieldObservation;
+ private FieldUnitDetailSection section_fieldUnit;
/**
* <p>Constructor for DerivedUnitFacadeDetailElement.</p>
section_general.setEntity(facade);
section_derivedUnitBase.setEntity(facade);
section_gatheringEvent.setEntity(facade);
- section_fieldObservation.setEntity(facade);
+ section_fieldUnit.setEntity(facade);
} catch (DerivedUnitFacadeNotSupportedException e) {
AbstractUtility.errorDialog("Error", this, "SpecimenFacadeNotSupportedException while inititating SpecimenFacade", e);
section_gatheringEvent.dispose();
section_gatheringEvent = null;
}
- if(section_fieldObservation != null){
- removeControl(section_fieldObservation);
- section_fieldObservation.dispose();
- section_fieldObservation = null;
+ if(section_fieldUnit != null){
+ removeControl(section_fieldUnit);
+ section_fieldUnit.dispose();
+ section_fieldUnit = null;
}
}
addControl(section_gatheringEvent);
addElement(section_gatheringEvent);
- section_fieldObservation = formFactory.createFieldObservationDetailSection(getConversationHolder(), formElement, null, ExpandableComposite.TWISTIE);
- section_fieldObservation.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
- addControl(section_fieldObservation);
- addElement(section_fieldObservation);
+ section_fieldUnit = formFactory.createFieldObservationDetailSection(getConversationHolder(), formElement, null, ExpandableComposite.TWISTIE);
+ section_fieldUnit.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
+ addControl(section_fieldUnit);
+ addElement(section_fieldUnit);
section_derivedUnitBase = formFactory.createDerivedUnitBaseDetailSection(getConversationHolder(), formElement, null, ExpandableComposite.TWISTIE);
section_derivedUnitBase.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
/** {@inheritDoc} */
@Override
public void handleEvent(Object eventSource) {
- if(eventSource == section_derivedUnitBase || eventSource == section_gatheringEvent || eventSource == section_fieldObservation){
+ if(eventSource == section_derivedUnitBase || eventSource == section_gatheringEvent || eventSource == section_fieldUnit){
if(getParentElement() instanceof AbstractCdmDetailSection) {
((AbstractCdmDetailSection) getParentElement()).updateTitle();
}
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;
/**
- * <p>FieldObservationDetailSection class.</p>
+ * <p>FieldUnitDetailSection class.</p>
*
* @author n.hoffmann
* @created Jun 17, 2010
public class FieldUnitDetailSection extends AbstractCdmDetailSection<DerivedUnitFacade> implements IDerivedUnitFacadeDetailSection{
/**
- * <p>Constructor for FieldObservationDetailSection.</p>
+ * <p>Constructor for FieldUnitDetailSection.</p>
*
* @param formFactory a {@link eu.etaxonomy.taxeditor.ui.element.CdmFormFactory} object.
* @param conversation a {@link eu.etaxonomy.cdm.api.conversation.ConversationHolder} object.
*/
@Override
protected AbstractCdmDetailElement<DerivedUnitFacade> createCdmDetailElement(AbstractCdmDetailSection<DerivedUnitFacade> parentElement, int style) {
- return formFactory.createFieldObservationDetailElement(parentElement);
+ return formFactory.createFieldUnitDetailElement(parentElement);
}
}
*/
@Override
public AbstractCdmDetailElement<DerivedUnitFacade> createElement(ICdmFormElement rootElement) {
- FieldUnitDetailElement detailElement = formFactory.createFieldObservationDetailElement(rootElement);
+ FieldUnitDetailElement detailElement = formFactory.createFieldUnitDetailElement(rootElement);
detailElement.setEntity(getEntity());
return detailElement;
}
formFactory.createHorizontalSeparator(parent, SWT.BORDER);
- FieldUnitDetailSection fieldUnitDetailSection = formFactory.createFieldObservationDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
+ FieldUnitDetailSection fieldUnitDetailSection = formFactory.createFieldUnitDetailSection(getConversationHolder(), parent, this, ExpandableComposite.TWISTIE);
formFactory.createHorizontalSeparator(parent, SWT.BORDER);