Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsInserting image in a node
https://www.eclipse.org/forums/index.php/mv/msg/212409/681999/#msg_681999
I want to insert an image in a diagram node. I tried the method I found which consists to put this code in XXXEditPart, modifying the XXXFigure constructor
but it doesn't works ='(
/**
* @generated NOT
*/
public XXXFigure() {
// Get the picture
Image img = new Image(null,"c:\\toto.png");
ImageFigure imgF = new ImageFigure();
imgF.setImage(img);
// Add it to the figure
this.add(imgF);
// Set figure size as picture size
this.setMaximumSize(imgF.getSize());
this.setMinimumSize(imgF.getSize());
createContents();
}
Can anybody help me please? (It's an urgent problem)
Thanks
]]>fenrir 2011-06-10T07:53:40-00:00Re: Inserting image in a node
https://www.eclipse.org/forums/index.php/mv/msg/212409/682028/#msg_682028
Just changed