24-07-2008, 01:15 PM
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:
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?
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();
...How can I solve this in best possilbe way?