Hi there. I’m trying to use the JGoSubGraph to create an “overview” view where several smaller graphs are displayed, each in an enclosing JGoSubGraph for clear distinction between graphs.
This works resonably well but there are a number of odd behaviors related to the collapsing/expanding of these sub graphs.
- The handle stays under the mouse pointer but the top-left of the buonding box moves. This behaviour can be seen in the JGo example demo1. But why does the bounding box move? Very irritating.
- When overriding layoutHandle() both the handle and the boudingbox moves.
- When overriding layoutLabel() and setting an inset the top of the JGoSubGraph disapears over the top of my frame when I drag a contained node.
- I made this simple test:
public void collapse()
Rectangle thePreRect = getBoundingRect();
Rectangle thePostRect = getBoundingRect();
System.out.println("The before: " + thePreRect + " and after: " + thePostRect );
Which priduces this, in my eyes, confusing result:
The before: java.awt.Rectangle[x=71,y=48,width=94,height=41] and after: java.awt.Rectangle[x=71,y=48,width=94,height=41]
(The subgraph did move but it doesn’t see to have been moved by the collapse() call, alternatively getBoundingRect() is not aware of the move)
What I would like to have is a subgraph which doesn’t change it’s top-left corner when collapsed/expanded.
Also I would like to be able to have insets so the nodes aren’t drawn under the label and handle.
And I would like the subgraph to be just high enough for the label to show with a couple of pixeld above and below when collapsed.
Has anyone successfully implemented any of these treats?