Class VertexImageShaperDemo

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer

public class VertexImageShaperDemo extends JApplet
Demonstrates the use of images to represent graph vertices. The images are supplied via the VertexShapeFunction so that both the image and its shape can be utilized. The images used in this demo (courtesy of slashdot.org) are rectangular but with a transparent background. When vertices are represented by these images, it looks better if the actual shape of the opaque part of the image is computed so that the edge arrowheads follow the visual shape of the image. This demo uses the FourPassImageShaper class to compute the Shape from an image with transparent background.
See Also:
  • Field Details

  • Constructor Details

    • VertexImageShaperDemo

      public VertexImageShaperDemo()
  • Method Details

    • createGraph

      private void createGraph(int vertexCount)
      create some vertices
      Parameters:
      count - how many to create
    • main

      public static void main(String[] args)