// $Id$
/**
* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
+* 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;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Label;
-
-import eu.etaxonomy.cdm.model.common.VersionableEntity;
-import eu.etaxonomy.taxeditor.ui.campanula.compatibility.ICdmFormElement;
-import eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement;
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
+import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
/**
* <p>EmptyElement class.</p>
* @created Nov 5, 2009
* @version 1.0
*/
-public class EmptyElement extends AbstractCdmFormElement{
+public class EmptyElement extends AbstractCdmDetailElement{
/**
* <p>Constructor for EmptyElement.</p>
* @param parentElement a {@link eu.etaxonomy.taxeditor.ui.element.ICdmFormElement} object.
* @param entity a {@link eu.etaxonomy.cdm.model.common.VersionableEntity} object.
*/
- public EmptyElement(CdmFormFactory toolkit, ICdmFormElement parentElement, VersionableEntity entity, int style) {
+ public EmptyElement(CdmFormFactory toolkit, ICdmFormElement parentElement, String emptyText, int style) {
super(toolkit, parentElement);
- addControl(new Label(getLayoutComposite(), SWT.HORIZONTAL));
+ if(emptyText!=null){
+ formFactory.createLabel(parentElement, emptyText);
+ }
}
+
+ /* (non-Javadoc)
+ * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement#createControls(eu.etaxonomy.taxeditor.ui.element.ICdmFormElement, java.lang.Object, int)
+ */
+ @Override
+ protected void createControls(ICdmFormElement formElement, Object entity, int style) {
+ //empty
+ }
+
+ /* (non-Javadoc)
+ * @see eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement#handleEvent(java.lang.Object)
+ */
+ @Override
+ public void handleEvent(Object eventSource) {
+ // empty
+ }
}