Is there a handy way to return a vertex object if you have it's id as a string? I'd like to be able to write something like:

graph.insertEdge(parent, null, "", graph.getVertexByID("Alice"), graph.getVertexByID("Bob"));\n

asked 26 Sep '11, 08:25

Joe%20Reddington's gravatar image

Joe Reddington
accept rate: 0%

edited 27 Sep '11, 07:04

David's gravatar image


Thank you! Saves me using the hashmap :)

(27 Sep '11, 06:07) Joe Reddington

graph.getModel().getCell("Bob") should work.


answered 27 Sep '11, 06:04

Gaudenz's gravatar image

accept rate: 39%

There is no such method in JGraphX.

(24 Nov '11, 02:21) DeadMeat

There is on mxGraphModel, just not on the model interface. The original poster did specify the language of the question before the answer was given, I added the tag afterwards.

(24 Nov '11, 06:27) David
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]( "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: 26 Sep '11, 08:25

Seen: 1,520 times

Last updated: 24 Nov '11, 06:27