I'm using JUNG 2.0 to visually render a directed acyclic graph, and have added a custom EdgeRenderer to render edges in a variety of colors. The actual edges are drawn by invoking the drawLine()
and drawPolyline()
methods on a RenderContext
object.
All works as it should, except when I manually scroll the GraphZoomScrollPane
to which my VisualizationViewer
object is added: then the vertices scroll as expected, but the edge lines stay exactly in the same spot on the screen. That is to say:
This is what happens when I scroll
How can I get the edges to actually scroll with?
(If it helps, zooming with a CrossoverScalingControl
works perfectly fine, and the edges grow larger and smaller in their correct positions.)