简体   繁体   中英

GEF Connection and PropertyChangeListener

I'm writing on a eclipse plugin based on RCP and GEF that displays streetmaps. Nodes are the cities and Connections are supposed to be the streets. My Connections have several options like width, color or name and they can be changed over the property panel. My problem is, that AbstractConnectionEditPart doesn't implements the PropertyChangeListener and is generally handled in a different way than the nodes. I've found out, that GEF has a abstract class named ConnectionHandle but I've no idea how to "connect" it to my controller of the connection.

Does anybody has further information or can provide a working code snippet?

Thanks.

GEF edit parts don't implement any kind of listener by default. It is you job to either subclass the EditPart and implement a listener, or create an external listener to your model and update the EditPart when the model changes. You can check out my tutorials for more information on how this can be done (and sorry for the self-promotion, but the solution is there, so no need to write it again here).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM