RSS

Search Engine

Friday, July 2, 2010

Eclipse Drag and Drop

Eclipse supports Drag and Drop based on transfer types defined as a subclass "org.eclipse.swt.dnd.Transfer". Every UI element can define if it provides a certain transfer type as source and if it accepts a certain transfer type as destination.

Eclipse provides several pre-defined transfer types, to define your own transfer type it is recommended to subclass "org.eclipse.swt.dnd.ByteArrayTransfer".

The following will demonstrate the usage of drag and drop for your own domain object between two JFace viewers (table and tree). The example in this article will just transfer Text. For a comprehensive description of drag and drop please check the articles in the appendix.

0 comments:

Post a Comment