import eu.etaxonomy.taxeditor.ui.element.LayoutConstants;
/**
- *
* @author n.hoffmann
* @created Feb 26, 2010
*/
/**
* Sets the entity and updates controls
- *
- * @param entity
- * a T object.
*/
@Override
public void setEntity(T entity) {
}
}
- /** {@inheritDoc} */
@Override
public void setEnabled(boolean enabled) {
setEnabled(enabled, null);
}
- /** {@inheritDoc} */
@Override
public void setIrrelevant(boolean irrelevant) {
this.irrelevant = irrelevant;
/**
* Create all content elements
- *
- * @param formElement
- * a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement}
- * object.
- * @param entity
- * a T object.
- * @param style
- * a int.
*/
protected abstract void createControls(ICdmFormElement formElement,
T entity, int style);
- /** {@inheritDoc} */
@Override
public void propertyChange(PropertyChangeEvent event) {
if (event == null) {
/**
* Gets called when the source of the event is a child widget of this
* widget.
- *
- * @param eventSource
- * a {@link java.lang.Object} object.
*/
public abstract void handleEvent(Object eventSource);
"Parent element should be IConversationEnabled");
}
- /** {@inheritDoc} */
@Override
public void update(CdmDataChangeMap changeEvents) {
}
}
}
-
protected void updateControlStates(){
Collection<Object> except = new ArrayList<Object>();
for(ICdmFormElement formElement:getElements()){
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-
package eu.etaxonomy.taxeditor.ui.section.occurrence;
import org.eclipse.swt.events.SelectionListener;
+/**
+ * Copyright (C) 2007 EDIT
+ * European Distributed Institute of Taxonomy
+ * http://www.e-taxonomy.eu
+ *
+ * The contents of this file are subject to the Mozilla Public License Version 1.1
+ * See LICENSE.TXT at the top of this package for the full license terms.
+ */
package eu.etaxonomy.taxeditor.ui.section.occurrence;
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
// TODO Auto-generated constructor stub
}
- /** {@inheritDoc} */
@Override
protected void createControls(ICdmFormElement formElement,
DerivedUnitFacade entity, int style) {
combo_sex = formFactory.createDefinedTermComboElement(TermType.Sex, formElement, "Sex", entity.getSex(),style);
}
- /** {@inheritDoc} */
@Override
public void handleEvent(Object eventSource) {
if(eventSource == combo_kindOfUnit){
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-
package eu.etaxonomy.taxeditor.ui.section.occurrence;
import org.eclipse.swt.events.SelectionListener;
import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
- * <p>
- * CollectingAreasDetailElement class.
- * </p>
- *
* @author n.hoffmann
* @created Oct 14, 2010
- * @version 1.0
*/
public class CollectingAreaDetailElement extends
AbstractEntityCollectionElement<NamedArea> {
super(formFactory, section, entity, removeListener, null, style);
}
- /*
- * (non-Javadoc)
- *
- * @see
- * eu.etaxonomy.taxeditor.section.AbstractEntityCollectionElement#setEntity
- * (java.lang.Object)
- */
- /** {@inheritDoc} */
@Override
public void setEntity(NamedArea entity) {
selection_namedArea.setEntity(entity);
}
- /*
- * (non-Javadoc)
- *
- * @see
- * eu.etaxonomy.taxeditor.section.AbstractEntityCollectionElement#createControls
- * (eu.etaxonomy.taxeditor.forms.ICdmFormElement, int)
- */
- /** {@inheritDoc} */
@Override
public void createControls(ICdmFormElement formElement, int style) {
selection_namedArea = formFactory.createSelectionElement(NamedArea.class, //getConversationHolder(),
null, EntitySelectionElement.NOTHING, style);
}
- /*
- * (non-Javadoc)
- *
- * @see
- * eu.etaxonomy.taxeditor.section.AbstractEntityCollectionElement#handleEvent
- * (java.lang.Object)
- */
- /** {@inheritDoc} */
@Override
public void handleEvent(Object eventSource) {
if (eventSource == selection_namedArea) {
setEntity(selection_namedArea.getSelection());
}
}
-
}
import eu.etaxonomy.taxeditor.ui.section.DefaultCdmBaseComparator;
/**
- * <p>
- * CollectingAreasDetailSection class.
- * </p>
- *
* @author n.hoffmann
* @created Oct 14, 2010
- * @version 1.0
*/
public class CollectingAreasDetailSection extends AbstractEntityCollectionSection<DerivedUnitFacade, NamedArea> {
super(formFactory, conversation, parentElement, "Collecting Areas", style);
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.section.AbstractEntityCollectionSection#getCollection(java.lang.Object)
- */
- /** {@inheritDoc} */
@Override
public Collection<NamedArea> getCollection(DerivedUnitFacade entity) {
return entity.getCollectingAreas();
return new DefaultCdmBaseComparator<>();
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.section.AbstractEntityCollectionSection#createNewElement()
- */
- /** {@inheritDoc} */
@Override
public NamedArea createNewElement() {
NamedArea selection = NamedAreaSelectionDialog.select(getLayoutComposite().getShell(), //getConversationHolder(),
return selection;
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.section.AbstractEntityCollectionSection#addElement(eu.etaxonomy.cdm.model.common.IVersionableEntity)
- */
- /** {@inheritDoc} */
@Override
public void addElement(NamedArea element) {
getEntity().addCollectingArea(element);
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.section.AbstractEntityCollectionSection#removeElement(eu.etaxonomy.cdm.model.common.IVersionableEntity)
- */
- /** {@inheritDoc} */
@Override
public void removeElement(NamedArea element) {
getEntity().removeCollectingArea(element);
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.section.AbstractEntityCollectionSection#getEmptyString()
- */
- /** {@inheritDoc} */
@Override
public String getEmptyString() {
return "No collecting areas yet.";
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.section.AbstractEntityCollectionSection#getTooltipString()
- */
- /** {@inheritDoc} */
@Override
protected String getTooltipString() {
return "Add a collecting area";
}
- /**
- * {@inheritDoc}
- */
@Override
public NamedArea addExisting() {
return null;
}
- /**
- * {@inheritDoc}
- */
@Override
public boolean allowAddExisting() {
return false;
}
-
}
import eu.etaxonomy.taxeditor.ui.selection.EntitySelectionElement;
/**
- * <p>
- * CollectionDetailElement class.
- * </p>
- *
* @author n.hoffmann
* @created Oct 13, 2010
- * @version 1.0
*/
public class CollectionDetailElement extends
AbstractCdmDetailElement<Collection> {
super(formFactory, formElement);
}
- /*
- * (non-Javadoc)
- *
- * @see
- * eu.etaxonomy.taxeditor.section.AbstractCdmDetailElement#createControls
- * (eu.etaxonomy.taxeditor.forms.ICdmFormElement,
- * eu.etaxonomy.cdm.model.common.IAnnotatableEntity, int)
- */
- /** {@inheritDoc} */
@Override
protected void createControls(ICdmFormElement formElement,
Collection entity, int style) {
EntitySelectionElement.ALL, style);
}
- /*
- * (non-Javadoc)
- *
- * @see
- * eu.etaxonomy.taxeditor.section.AbstractCdmDetailElement#handleEvent(java
- * .lang.Object)
- */
- /** {@inheritDoc} */
@Override
public void handleEvent(Object eventSource) {
if (eventSource == text_titleCache) {
if (eventSource != text_titleCache) {
text_titleCache.setText(getEntity().getTitleCache());
}
-
}
-
}
* The contents of this file are subject to the Mozilla Public License Version 1.1
* See LICENSE.TXT at the top of this package for the full license terms.
*/
-
package eu.etaxonomy.taxeditor.ui.section.occurrence;
import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
*
* @author n.hoffmann
* @created Oct 13, 2010
- * @version 1.0
*/
public class CollectionWizardPage extends AbstractCdmEntityWizardPage<Collection> {
setPageComplete(true);
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.ui.forms.AbstractCdmEntityWizardPage#checkComplete()
- */
@Override
protected void checkComplete() {
setPageComplete(true);
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.forms.AbstractCdmEntityWizardPage#createElement(eu.etaxonomy.taxeditor.forms.ICdmFormElement)
- */
- /** {@inheritDoc} */
@Override
public AbstractCdmDetailElement<Collection> createElement(ICdmFormElement rootElement) {
CollectionDetailElement collectionDetailElement = formFactory.createCollectionDetailElement(rootElement);
collectionDetailElement.setEntity(entity);
return collectionDetailElement;
}
-
}