I created a lister to alert when an existing edge's end vertex is changed.\nAm able to resolve the old and new vertex of the connecting edge, but can't identify which edge is generating the event.

public class EdgeEndsChangeListner implements mxIEventListener {\n\[email protected]\npublic void invoke(Object sender, mxEventObject evt) {\n\nmxCell oldVertex=(mxCell) evt.getProperty("previous");\nmxCell newVertex=(mxCell) evt.getProperty("terminal");\n\n}\n


asked 30 Jan '12, 03:27

Saju%20Chithran's gravatar image

Saju Chithran
accept rate: 27%

The CONNECT_CELL event has a edge, terminal and source property, corresponding to the arguments of mxGraph.connectCell, and a previous property for the previous terminal, ie. you need:

mxCell edge=(mxCell) evt.getProperty("edge");\n

answered 30 Jan '12, 21:40

Gaudenz's gravatar image

accept rate: 39%

Thanks Gaudenz...

(30 Jan '12, 22:41) Saju Chithran
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 30 Jan '12, 03:27

Seen: 1,829 times

Last updated: 30 Jan '12, 22:41