package graph;

public class GraphEditor {
	static boolean packFrame = false;

	public static void main(String[] args) {
		GraphEditorFrame frame = new GraphEditorFrame(new Factory());
		//Validate frames that have preset sizes
		//Pack frames that have useful preferred size info, e.g. from their layout
		if (packFrame)
			frame.pack();
		else
			frame.validate();
		frame.setVisible(true);
	}
	
	static class Factory implements GraphEditorFrame.GraphFactory {
		public Graph newGraph(boolean directed) {
			return new AdjListGraph(directed);
		}
	}
} 