Revision 2d9a13f7
Added by Niels Hoffmann almost 14 years ago
taxeditor-editor/src/main/java/eu/etaxonomy/taxeditor/editor/GroupComposite.java | ||
---|---|---|
24 | 24 |
import org.eclipse.ui.forms.widgets.TableWrapData; |
25 | 25 |
import org.eclipse.ui.forms.widgets.TableWrapLayout; |
26 | 26 |
|
27 |
import eu.etaxonomy.cdm.model.common.CdmBase; |
|
27 | 28 |
import eu.etaxonomy.cdm.model.taxon.Taxon; |
29 |
import eu.etaxonomy.taxeditor.editor.name.AbstractNameComposite; |
|
28 | 30 |
import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor; |
29 | 31 |
import eu.etaxonomy.taxeditor.preference.Resources; |
30 | 32 |
|
... | ... | |
66 | 68 |
|
67 | 69 |
public void setDroppable(boolean droppable) { |
68 | 70 |
if (droppable) { |
69 |
Transfer[] types = new Transfer[] {WidgetTransfer.getInstance()};
|
|
71 |
Transfer[] types = new Transfer[] {CdmDataTransfer.getInstance()};
|
|
70 | 72 |
int operations = DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_DEFAULT; |
71 | 73 |
target = new DropTarget(this, operations); |
72 | 74 |
target.setTransfer(types); |
... | ... | |
82 | 84 |
|
83 | 85 |
public void drop(DropTargetEvent event) { |
84 | 86 |
|
85 |
if (event.data instanceof GroupedComposite) {
|
|
87 |
if (event.data instanceof CdmBase) {
|
|
86 | 88 |
|
87 |
final GroupedComposite composite = (GroupedComposite) event.data; |
|
88 |
if (composite.getDragSource() != null) { |
|
89 |
final AbstractNameComposite composite = editor.getNameComposite(event.data); |
|
90 |
|
|
91 |
if(composite != null && composite.getDragSource() != null){ |
|
89 | 92 |
|
90 | 93 |
// Make sure composite is not being dropped onto its current parent |
91 | 94 |
if ( ! composite.getParent().equals(GroupComposite.this)) { |
Also available in: Unified diff
merged new features from tabbed_properties branch into trunk