Class GraphZoomScrollPaneDemo


  • public class GraphZoomScrollPaneDemo
    extends java.lang.Object
    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 Classes 
      Modifier and Type Class Description
      (package private) static class  GraphZoomScrollPaneDemo.TestGraphMouseListener<V>
      A nested class to demo the GraphMouseListener finding the right vertices after zoom/pan
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) DirectedSparseGraph<java.lang.String,​java.lang.Number> graph
      the graph
      (package private) VisualizationViewer<java.lang.String,​java.lang.Number> vv
      the visual component and renderer for the graph
    • Constructor Summary

      Constructors 
      Constructor Description
      GraphZoomScrollPaneDemo()
      create an instance of a simple graph with controls to demo the zoom features.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void createEdges​(java.lang.String[] v)
      create edges for this demo graph
      private java.lang.String[] createVertices​(int count)
      create some vertices
      static void main​(java.lang.String[] args)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • vv

        VisualizationViewer<java.lang.String,​java.lang.Number> vv
        the visual component and renderer for the graph
    • Constructor Detail

      • GraphZoomScrollPaneDemo

        public GraphZoomScrollPaneDemo()
        create an instance of a simple graph with controls to demo the zoom features.
    • Method Detail

      • createVertices

        private java.lang.String[] createVertices​(int count)
        create some vertices
        Parameters:
        count - how many to create
        Returns:
        the Vertices in an array
      • createEdges

        void createEdges​(java.lang.String[] v)
        create edges for this demo graph
        Parameters:
        v - an array of Vertices to connect
      • main

        public static void main​(java.lang.String[] args)