/*
* 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.AutomatonPane;
import automata.State;
import automata.Transition;
import automata.vdg.VDGTransition;
/**
* This is a transition creator for variable dependency graphs.
*
* @author Thomas Finley
*/
public class VDGTransitionCreator extends TransitionCreator {
/**
* Instantiates a transition creator.
*
* @param parent
* the parent object that any dialogs or windows brought up by
* this creator should be the child of
*/
public VDGTransitionCreator(AutomatonPane parent) {
super(parent);
}
/**
* Creates a transition with user interaction and returns it.
*
* @return returns the variable dependency transition
*/
public Transition createTransition(State from, State to) {
VDGTransition t = new VDGTransition(from, to);
getParent().getDrawer().getAutomaton().addTransition(t);
return null;
}
/**
* Edits a given transition. Ideally this should use the same interface as
* that given by createTransition
.
*
* @param transition
* the transition to edit
* @return false
if the user decided to not edit a
* transition, true
if the edit was "approved"
*/
public boolean editTransition(Transition transition) {
return false;
}
}