Class UnicodeLabelDemo


  • public class UnicodeLabelDemo
    extends java.lang.Object
    A demo that shows flag images as vertices, and uses unicode to render vertex labels.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) Graph<java.lang.Integer,​java.lang.Number> graph
      the graph
      (package private) boolean showLabels  
      (package private) VisualizationViewer<java.lang.Integer,​java.lang.Number> vv
      the visual component and renderer for the graph
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void createEdges​(java.lang.Integer[] v)
      create edges for this demo graph
      private java.lang.Integer[] createVertices​(int count)
      create some vertices
      protected void loadImages​(java.lang.Integer[] vertices, java.util.Map<java.lang.Integer,​javax.swing.Icon> imageMap)  
      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

      • graph

        Graph<java.lang.Integer,​java.lang.Number> graph
        the graph
      • vv

        VisualizationViewer<java.lang.Integer,​java.lang.Number> vv
        the visual component and renderer for the graph
      • showLabels

        boolean showLabels
    • Constructor Detail

      • UnicodeLabelDemo

        public UnicodeLabelDemo()
    • Method Detail

      • createVertices

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

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

        protected void loadImages​(java.lang.Integer[] vertices,
                                  java.util.Map<java.lang.Integer,​javax.swing.Icon> imageMap)
      • main

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