I can't use my own model class implements mxIGraphModel, because class mxGraphComponent has following code,\n mxGraphModel oldModel = (mxGraphModel) evt.getOldValue();\n mxGraphModel newModel = (mxGraphModel) evt.getNewValue();

\n

it always try to cast to class mxGraphModel, instead of mxIGraphModel

asked 21 Aug '11, 17:33

michael_cao's gravatar image

michael_cao
31
accept rate: 0%


To implement your own model currently you need to override the component too and add your own viewChangeHandler, getImportableCells and getExportableCells if your model does not sub-class mxGraphModel. We will look at reducing that dependency in the future.

link

answered 22 Aug '11, 00:17

David's gravatar image

David
4.9k21831
accept rate: 47%

Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

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

Tags:

×3

Asked: 21 Aug '11, 17:33

Seen: 874 times

Last updated: 22 Aug '11, 00:17