I have a vertex and it has its name, the label inside the vertex. But I also wan't to add a new label, with extra information, for the same vertex. Is there a way to do it?
Asked
Active
Viewed 643 times
1 Answers
0
If you need only a "static label" you could use a "stencil".
The Stencils.java example program has some multi-label shapes.
If however you want more control on the content you want to show in the label, I could not find any "official" documentation: you might want to look at the examples I've added to a related question.
Here are the direct links to the examples:
An example of a multi-value node in JGraphX using "child nodes"
Here I've created child nodes and "locked" them to a parent/container node, by setting relative coordinates.
An example of a multi-value node in JGraphX using "custom shape"
Here I've created a "custom shape" to access the Graphics2D awt object and be able to draw my shape and labels.