I understand how following statements create or add cells to your graph manually,

Object v1 = graph.insertVertex(parent, null, "v1", 330, 230, 100, 40); Object v2 = graph.insertVertex(parent, null, "v2", 330, 300, 100, 40);

Is there a way to add them automatically? possibly in a for loop, because I don't want to write hundreds of code if there are a lot of cells to add. Once I add them all, hopefully, I could use mxHierarchicalLayout to layout the whole thing.

Thanks,

asked 05 Jul '12, 12:43

kchoi's gravatar image

kchoi
11
accept rate: 0%


I guess you said it already - in a loop.

link

answered 06 Jul '12, 02:46

mremersoncod's gravatar image

mremersoncod
211114
accept rate: 12%

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:

×228
×194
×66
×7
×6

Asked: 05 Jul '12, 12:43

Seen: 1,500 times

Last updated: 06 Jul '12, 02:46