Package edu.uci.ics.jung.samples
Class GraphZoomScrollPaneDemo
java.lang.Object
edu.uci.ics.jung.samples.GraphZoomScrollPaneDemo
Demonstrates the use of
GraphZoomScrollPane
.
This class shows the VisualizationViewer
zooming
and panning capabilities, using horizontal and
vertical scrollbars.
This demo also shows ToolTips on graph vertices and edges, and a key listener to change graph mouse modes.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
A nested class to demo the GraphMouseListener finding the right vertices after zoom/pan -
Field Summary
FieldsModifier and TypeFieldDescription(package private) DirectedSparseGraph
<String, Number> the graph(package private) VisualizationViewer
<String, Number> the visual component and renderer for the graph -
Constructor Summary
ConstructorsConstructorDescriptioncreate an instance of a simple graph with controls to demo the zoom features. -
Method Summary
Modifier and TypeMethodDescription(package private) void
createEdges
(String[] v) create edges for this demo graphprivate String[]
createVertices
(int count) create some verticesstatic void
-
Field Details
-
graph
DirectedSparseGraph<String,Number> graphthe graph -
vv
the visual component and renderer for the graph
-
-
Constructor Details
-
GraphZoomScrollPaneDemo
public GraphZoomScrollPaneDemo()create an instance of a simple graph with controls to demo the zoom features.
-
-
Method Details
-
createVertices
create some vertices- Parameters:
count
- how many to create- Returns:
- the Vertices in an array
-
createEdges
create edges for this demo graph- Parameters:
v
- an array of Vertices to connect
-
main
-