Inserting image in a node [message #681999] |
Fri, 10 June 2011 07:53 |
fenrir Messages: 15 Registered: April 2011 Location: France |
Junior Member |
|
|
Hi
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
[Updated on: Fri, 10 June 2011 09:10] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.04982 seconds