public AddTrapStatePane(AutomatonEnvironment environment) 
	{
		myAutomaton = (FiniteStateAutomaton) environment.getAutomaton().clone();
		JFrame frame = Universe.frameForEnvironment(environment);

		setLayout(new BorderLayout());

		JPanel labels = new JPanel(new BorderLayout());
		JLabel mainLabel = new JLabel();
		JLabel detailLabel = new JLabel();
		labels.add(mainLabel, BorderLayout.NORTH);
		labels.add(detailLabel, BorderLayout.SOUTH);

		add(labels, BorderLayout.NORTH);
		SelectionDrawer automatonDrawer = new SelectionDrawer(myAutomaton);

		final AddTrapStateController controller = new AddTrapStateController(myAutomaton,
				automatonDrawer, mainLabel, detailLabel, frame);

		gui.editor.EditorPane ep = new gui.editor.EditorPane(automatonDrawer,
				new ToolBox() {
					public List tools(AutomatonPane view, AutomatonDrawer drawer) {
						LinkedList tools = new LinkedList();
						tools.add(new ArrowNontransitionTool(view, drawer));
						tools.add(new TrapStateTool(view, drawer,
										controller));
						tools.add(new TrapTransitionTool(view, drawer,
								controller));
						return tools;
					}
				});

		JToolBar bar = ep.getToolBar();
		
		bar.addSeparator();
		bar.add(new JButton(new AbstractAction("Do All") {
			public void actionPerformed(ActionEvent e) {
				controller.doAll();
			}
		}));

		add(ep, BorderLayout.CENTER);
	}