Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Copying GEF Diagram to Windows Applications
Copying GEF Diagram to Windows Applications [message #244926] Wed, 13 August 2008 10:08
Eclipse UserFriend
Originally posted by:


I am working on a graphical editor using GEF and I want to provide the
support of copying my GEF diagram to the windows applications. By reading
to the existing posts on this newsgroup I came to know that I need to use and clipboard. I have implemented it in my code and I
am able to copy/paste my GEF image between eclipse applications, however,
in windows applications paste button does not get enabled.

I am using the available at mples/src/org/eclipse/swt/examples/dnd/

My Code looks as follows

IFigure figure = getMyFigure();
int w = figure.getSize().width;
int h = figure.getSize().height;
Image image = new Image(Display.getDefault(), w, h);
GC gc = new GC(image);
SWTGraphics graphics = new SWTGraphics(gc);
ImageData data = image.getImageData();
Clipboard clipboard = new Clipboard(Display.getDefault());
try {
clipboard.setContents(new ImageData[] { data }, new Transfer[] {
ImageTransfer.getInstance() });
} finally {

Any help is greatly appreciated.

Previous Topic:Big figure problem on linux platorm
Next Topic:[Announce] GEF 3.5.0M1 is available
Goto Forum:

Current Time: Fri Oct 19 09:31:54 GMT 2018

Powered by FUDForum. Page generated in 0.01507 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top