when double clicked the vertex,label can be changed.But I want to make it unable.But if it's a Edge,it can always be changed.specified method is needed.

asked 20 Jun '12, 22:56

coding%20girl's gravatar image

coding girl
accept rate: 0%

graph.setCellsEditable(false); this method makes all mxcell uneditable, I want to make Edge is editable.

(20 Jun '12, 23:09) coding girl

Use editable=0 in the style or override mxGraph.isCellEditable.


answered 21 Jun '12, 01:27

Gaudenz's gravatar image

accept rate: 39%

edited 21 Jun '12, 01:28


private static mxGraph graph = new mxGraph(){ public boolean isCellEditable(Object cell){ if(cell instanceof mxCell){ mxCell c=(mxCell)cell; if(c.isEdge()){ return true; }else{ return false; } } return false; } };

override mxGraph.isCellEditable. Ok and thx. But I wander that Use editable=0 in the style.Does it mean cell.setStyle("editable=0")? In the API, it's written:Holds the style as a string of the form stylename[;key=value]. But what does "key" mean?

(21 Jun '12, 02:13) coding girl


(21 Jun '12, 02:14) Gaudenz
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: 20 Jun '12, 22:56

Seen: 43,143 times

Last updated: 21 Jun '12, 02:14