04-07-2007, 10:43 AM
The GraphView demo from the prefuse downloads already contains the implementation of a graph overview panel, but it is not active because it is commented out.
So for the case you missed this hidden treasure, I thought to post the graphview demo here with this treasure revealed.
The main step to realize the overview panel is as simple as:
where the in the GraphView demo implemented FitOverViewListener class takes care that the graph is always displayed as a whole in the panel.
Further required steps are just to include the overview into the GUI.
[attachment=99]
You might want to use this demo to get more clear about the design of the prefuse toolkit, which is based upon the information visualization reference model (prefuse toolkit structure). In particular this demo might help you to understand which functionality acts on the level of the visualization and by that effects both displays (like neighborhood highlight control). Other functions like dragging nodes act on the level of the display and by that can differ between the two display panels (no dragging in the overview panel for example).
So for the case you missed this hidden treasure, I thought to post the graphview demo here with this treasure revealed.
The main step to realize the overview panel is as simple as:
Code:
Display overview = new Display(m_vis);
overview.setSize(290,290);
overview.addItemBoundsListener(new FitOverviewListener());Further required steps are just to include the overview into the GUI.
[attachment=99]
You might want to use this demo to get more clear about the design of the prefuse toolkit, which is based upon the information visualization reference model (prefuse toolkit structure). In particular this demo might help you to understand which functionality acts on the level of the visualization and by that effects both displays (like neighborhood highlight control). Other functions like dragging nodes act on the level of the display and by that can differ between the two display panels (no dragging in the overview panel for example).