/*
* 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 Moore machines
* that loads the MooreArrowTool
and
* MooreStateTool
instead of the default
* ArrowTool
and StateTool
.
*
* @see automata.mealy.MooreMachine
* @see MooreArrowTool
* @see MooreStateTool
* @author Jinghui Lim
*
*/
public class MooreToolBox implements ToolBox
{
/**
* Returns a list of tools for Moore machines, similar to
* the DefaultToolBox
. This includes a
* MooreArrowTool
, MooreStateTool
* 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 MooreArrowTool(view, drawer));
list.add(new MooreStateTool(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;
}
}