Class ShowGraph


  • public class ShowGraph
    extends java.lang.Object
    A class to render a Graph given a list of label names
    Author:
    tenorsax, Yana Valasatava (adaptation), Anthony Bradley
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  ShowGraph.MyEdge  
    • Constructor Summary

      Constructors 
      Constructor Description
      ShowGraph​(org.jgrapht.Graph<java.lang.Integer,​org.jgrapht.graph.DefaultWeightedEdge> graph, java.lang.String[] names)
      Constructor requires the graph and the labels of the vertices.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static org.jgrapht.ListenableGraph<java.lang.String,​ShowGraph.MyEdge> buildGraph​(double threshold, boolean showEdgeLabels)  
      static org.jgrapht.Graph<java.lang.Integer,​org.jgrapht.graph.DefaultWeightedEdge> getGraph()  
      java.lang.String[] getNames()  
      static void setGraph​(org.jgrapht.Graph<java.lang.Integer,​org.jgrapht.graph.DefaultWeightedEdge> graph)  
      void setNames​(java.lang.String[] names)  
      void showGraph​(double threshold, boolean showEdgeLabels)  
      • Methods inherited from class java.lang.Object

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

      • ShowGraph

        public ShowGraph​(org.jgrapht.Graph<java.lang.Integer,​org.jgrapht.graph.DefaultWeightedEdge> graph,
                         java.lang.String[] names)
        Constructor requires the graph and the labels of the vertices.
        Parameters:
        graph - the input Graph object
        names - the labels of the vertices
    • Method Detail

      • showGraph

        public void showGraph​(double threshold,
                              boolean showEdgeLabels)
      • buildGraph

        public static org.jgrapht.ListenableGraph<java.lang.String,​ShowGraph.MyEdge> buildGraph​(double threshold,
                                                                                                      boolean showEdgeLabels)
      • getGraph

        public static org.jgrapht.Graph<java.lang.Integer,​org.jgrapht.graph.DefaultWeightedEdge> getGraph()
      • setGraph

        public static void setGraph​(org.jgrapht.Graph<java.lang.Integer,​org.jgrapht.graph.DefaultWeightedEdge> graph)
      • getNames

        public java.lang.String[] getNames()
      • setNames

        public void setNames​(java.lang.String[] names)