I am struck up in situation where my GraphZoomScrollPane
is working really weierdly, where the scroll bars disappear suddenly after some zoom in and zoom out operations. They do come bak but with improper size and no Y? Can any one help me in this regard and let me know what are the parameters on which zooming depends? I am using JUNG PopupGraphMousePlugin
, ModalGraphMouse
, DefaultSettableVertexLocationFunction
, EdgeWeightStrokeFunction
.
Any sort of documentation or help is greatly appreciated.
Asked
Active
Viewed 417 times
3
-
1Please provide an [sscce](http://sscce.org/) that exhibits the problem you describe. – trashgod Sep 14 '11 at 06:14
-
Belove is the SSCCE you have asked.. please reviewe it ans let me know as soon as possible pls.... – cathy Sep 20 '11 at 05:19
1 Answers
0
private JPanel _getCenterPanel() {
JPanel jpMainPanel = new com.panduit.acmnms.gui.framework.ACMPanel(new GridLayout(1,0));
initVisualViewer();
pane = new GraphZoomScrollPane(vv);//Defined in the begng.
jpMainPanel.add(pane);
return jpMainPanel;
}
private void initVisualViewer() {
clusteringLayout = new SubLayoutDecorator(new SpringLayout(graph));
Dimension preferredSize = new Dimension(width, height);
visualizationModel = new DefaultVisualizationModel(clusteringLayout, preferredSize);
vv = new VisualizationViewer(visualizationModel, pr, preferredSize);
ewcs = new EdgeWeightStrokeFunction(edge_weight);
vertexLocations = new DefaultSettableVertexLocationFunction();
vv.setDoubleBuffered(false);
vv.setGraphMouse(graphMouse);
graphMouse.setMode(ModalGraphMouse.Mode.PICKING);
popupGraphMousePlugin = new PopupGraphMousePlugin(vertexLocations);
graphMouse.add(popupGraphMousePlugin);
System.out.println(" graphMouse.getModeMenu() "+graphMouse.getModeMenu());
graphMouse.setZoomAtMouse(true);
vv.setGraphMouse(graphMouse);
vertexImagerAndShapeFunction = new VertexIconAndShapeFunction(new EllipseVertexShapeFunction());
vertexImagerAndShapeFunction.setIconMap(iconMap);
pr.setVertexIconFunction(vertexImagerAndShapeFunction);
pr.setVertexShapeFunction(vertexImagerAndShapeFunction);
vertexStringerImpl = new VertexStringerImpl(labelMap);
pr.setVertexStringer(vertexStringerImpl);
vertexToolTipFunctionAdapter = new VertexToolTipFunctionAdapter(tooTipMap);
vv.setToolTipFunction(vertexToolTipFunctionAdapter);
vv.setPickSupport(new ShapePickSupport());
pr.setEdgeShapeFunction(new EdgeShape.QuadCurve());
ewcs.setWeighted(true);
vv.setBackground(Color.white);
}
Above is the part of the code which is responsible for zooming part of the code. please let me knw. Where is the wrong.
-
Hi geeks there seems to be an issue with the JUNG it self you can visit the link http://www.jarvana.com/jarvana/view/jung/jung/1.7.6/jung-1.7.6-sources.jar!/samples/graph/GraphZoomScrollPaneDemo.java?format=ok to see the issue: – cathy Jan 18 '12 at 07:04