I am trying to create/customize a simple graph (mainly using the helloworld example). Now I want to explicitly set the cell label. The code I am utilizing is basically these two lines:

mxCellState state=graph.getView().getState(vertex)

Now the labels show up as expected in the corresponding cells (in this case the vertices) of the JFrame application. However when I somehow touch the cells and for example moving it to another position in the JFrame they disappear and the original labels (a string representation of the associated objects) are displayed instead.

Is there any way to make the custom labels more permanent ? (So maybe directly associate them to the cells itself.) Or do I have to implement some function that generates the custom labels when a cell is touched.

Thanks, marian

asked 07 Aug '12, 04:56

marian's gravatar image

accept rate: 0%

edited 07 Aug '12, 05:00


answered 08 Aug '12, 07:13

David's gravatar image

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



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: 07 Aug '12, 04:56

Seen: 2,562 times

Last updated: 08 Aug '12, 07:13