/* * JFLAP - Formal Languages and Automata Package * * * Susan H. Rodger * Computer Science Department * Duke University * August 27, 2009 * Copyright (c) 2002-2009 * All rights reserved. * JFLAP is open source software. Please see the LICENSE for terms. * */ package gui.editor; import gui.viewer.AutomatonDrawer; import gui.viewer.AutomatonPane; import java.util.List; /** * This is a special ToolBox for Mealy machines * that loads the MealyArrowTool instead of the * default ArrowTool. * * @see automata.mealy.MealyMachine * @see MealyArrowTool * @author Jinghui Lim * */ public class MealyToolBox implements ToolBox { /** * Returns a list of tools for Mealy machines, similar to * the DefaultToolBox. This includes a * MealyArrowTool, StateTool * TransitionTool, and DeleteTool * in that order. * * @param view the component that the automaton will be drawn in * @param drawer the drawer that will draw the automaton in the * view * @return a list of Tool objects. */ public List tools(AutomatonPane view, AutomatonDrawer drawer) { List list = new java.util.ArrayList(); list.add(new MealyArrowTool(view, drawer)); list.add(new StateTool(view, drawer)); list.add(new TransitionTool(view, drawer)); list.add(new DeleteTool(view, drawer)); list.add(new UndoTool(view, drawer)); list.add(new RedoTool(view, drawer)); return list; } }