I am using JUNG for displaying network devices as graphs. Each edge is a link between two network elements. I want to add a picture exactly in the middle of the link. Currently my link looks like this: enter image description here
The code for it is:
vv.getRenderContext().setEdgeLabelTransformer(new Function<GraphLink,String>() {
URL url = getClass().getResource("/icons/model/conn.radio.png");
public String apply(GraphLink input) {
return "<html><img src="+url+" height=14 width=14>";
}});
As you can see the icon is adjacent with the link. Is there any option so the link could split the icon in two equals parts?