public AutomatonDrawer(Automaton automaton) {
		this.automaton = automaton;
		DrawerListener listener = new DrawerListener();
		getAutomaton().addStateListener(listener);
		getAutomaton().addTransitionListener(listener);
        
        /*
         * Use a moore state drawer if it is a Moore machine.
         * This draws a little box that shows the output of the
         * state.
         */
        if(automaton instanceof automata.mealy.MooreMachine)
            statedrawer = new MooreStateDrawer();
	}