Forums

Full Version: multiple directed edges and labels
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm making a program that will visualize some data - the nodes can have multiple same directed edges.

So the first thing is to make multiple edges on nodes - I already looked into Edgerenderer, but I wan't your opinion how it would be possible to implement this.

At last those edges have labels (decorators), currently I place them by getting
from edge layout all items and get their bounds.
Excerpt from program:
Code:
Iterator<DecoratorItem> iter = m_vis.items(m_group);
while (iter.hasNext()) {
DecoratorItem decorator = iter.next();
VisualItem decoratedItem = decorator.getDecoratedItem();

if (decoratedItem.isVisible()) {
Rectangle2D bounds = decoratedItem.getBounds();
...
This obviuously doesn't work if you have more than one edge on same nodes, because all labels will be centered between that nodes.

How can I solve this in best possilbe way?
Reference URL's