Class GraphFromGraphMLDemo


  • public class GraphFromGraphMLDemo
    extends java.lang.Object
    Demonstrates loading (and visualizing) a graph from a GraphML file.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      (package private) static class  GraphFromGraphMLDemo.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) VisualizationViewer<java.lang.Number,​java.lang.Number> vv
      the visual component and renderer for the graph
    • Constructor Summary

      Constructors 
      Constructor Description
      GraphFromGraphMLDemo​(java.lang.String filename)
      Creates an instance showing a simple graph with controls to demonstrate the zoom features.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      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.Number,​java.lang.Number> vv
        the visual component and renderer for the graph
    • Constructor Detail

      • GraphFromGraphMLDemo

        public GraphFromGraphMLDemo​(java.lang.String filename)
                             throws javax.xml.parsers.ParserConfigurationException,
                                    org.xml.sax.SAXException,
                                    java.io.IOException
        Creates an instance showing a simple graph with controls to demonstrate the zoom features.
        Parameters:
        filename - the file containing the graph data we're reading
        Throws:
        javax.xml.parsers.ParserConfigurationException - if a SAX parser cannot be constructed
        org.xml.sax.SAXException - if the SAX parser factory cannot be constructed
        java.io.IOException - if the file cannot be read
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
                         throws javax.xml.parsers.ParserConfigurationException,
                                org.xml.sax.SAXException,
                                java.io.IOException
        Parameters:
        args - if this contains at least one element, the first will be used as the file to read
        Throws:
        javax.xml.parsers.ParserConfigurationException - if a SAX parser cannot be constructed
        org.xml.sax.SAXException - if the SAX parser factory cannot be constructed
        java.io.IOException - if the file cannot be read