|
|
|
|
|
|
Re: Capture linestyle of a connection and change it [message #515781 is a reply to message #515574] |
Sat, 20 February 2010 17:43 |
Sven Krause Messages: 119 Registered: July 2009 |
Senior Member |
|
|
Alireza,
the edit part is the controller between the view (gef IFigure) and the model (EObject). There are three generell kinds of edit parts: DiagramEditPart, ShapeEditPart and ConnectionEditPart. As the name says belongs these different edit parts to different kind of figures. Each edit part has a releation to its model element (getNotationView().getElement()). The refresh method is called indirectly on each model element change. So you have the freedom changing the line style, width, color or what ever you want as result of a model change.
Sven
[Updated on: Sun, 21 February 2010 16:19] Report message to a moderator
|
|
|
|
|
Re: Capture linestyle of a connection and change it [message #516791 is a reply to message #516786] |
Thu, 25 February 2010 08:20 |
Alireza Missing name Messages: 105 Registered: July 2009 |
Senior Member |
|
|
Dear Sven,
I think I need to explain a little more about my problem: I read data from DB and then generate a gmf diagram elements based of the db data. This is done in a Eclipse view class. So, whenever I create a connection, I want to be able to set its line width. Based on what you said, I need to overwrite refresh method, this works if want same line width for all connection of the same type. So, it does not work for me. The reason that I said I need an instance of EditPart is because of this, i.e., when create a connection, I could be able to call its getPrimaryShape and change the linestyle (linewidth). What do you think?
Best,
Alireza
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 2.67473 seconds