package bk;

import java.util.ArrayList;
import java.util.Collections;

import javax.swing.JTree;

import animation.AlgorithmStage;
import animation.AnimatedAlgorithm;
import animation.CodeLine;
import animation.ControlFlow;
import animation.Memory;
import animation.PseudoCodeNode;
import animation.PseudoCodeNode.CodeAction;
import graph.LayeredGraphNode;
import lib.TextLayoutHelper;

/**
 * The stage of compacting the layout.
 * @author kolja
 *
 */
public class Compaction implements AlgorithmStage{

    private LayeredGraphNode graph;
    private AnimatedAlgorithm alg;


    public Compaction( LayeredGraphNode graph, AnimatedAlgorithm alg )
    {
        this.graph = graph;
        this.alg = alg;
    }

    @Override
    public PseudoCodeNode createPseudocodeTree( JTree tree ) {
        PseudoCodeNode root = new PseudoCodeNode( TextLayoutHelper.setupPseudoCodeStage("Horizontal compaction"), tree, new CodeLine() {

			@Override
			public ControlFlow runForward(Memory m) {
				return null;
			}
        	
        }, alg );
        return root;
    }
    
    @Override
    public String getDebugString()
    {
        return "";
    }
}
