001package horstmann.ch08_graphed2;
002import java.awt.Color;
003
004/**
005   A simple graph with round nodes and straight edges.
006 */
007@SuppressWarnings("serial")
008public class SimpleGraph extends Graph
009{
010        public Node[] getNodePrototypes()
011        {
012                Node[] nodeTypes =
013                        {
014                                        new CircleNode(Color.BLACK),
015                                        new CircleNode(Color.WHITE)
016                        };
017                return nodeTypes;
018        }
019
020        public Edge[] getEdgePrototypes()
021        {
022                Edge[] edgeTypes =
023                        {
024                                        new LineEdge()
025                        };
026                return edgeTypes;
027        }
028}
029
030
031
032
033