Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[gmf-dev] How to create too elements dinamically

Hello,

 

It’s possible adding elements dynamically to a palette and then persist the image that was added to diagram? For example I want to provide one action that show a dialog where the user can choose a image and with this image I will create a element in palette. The problem it’s how I will create a element in diagram from this image.

 

My model contains the element Device, that when the user adding a image to palette I create a ToolEntry to palette from this image and this ToolEntry is of type Device. What I want to knows is what I have to do to pass the path of image when the user drag and drop the new element from palette to diagram?

 

Questions:

 

-         To make a action that appears in popup on palette what class or extension point I will contribute or extended?

-         How can I pass the image path that was added from palette to diagram? I just implement DragSourceListener and DropTargetListener and pass?

 

Thanks, and sorry about large email.

 


Back to the top