package DFT;

import java.awt.BorderLayout;
import java.awt.Dimension;

import javax.swing.JFrame;
import javax.swing.JPanel;

import signals.Signals;

public class TraceDFT extends JFrame{

	private static final long serialVersionUID = 1L;
	private Graph graph;
	private Tools tools;
	private JPanel container = new JPanel();

	public TraceDFT(Signals s, int width){
		
		this.setTitle("DFT");
        this.setSize(width+20, 500);
        this.setLocationRelativeTo(null);               
        this.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
        
        container.setLayout(new BorderLayout());
        
        graph = new Graph();
        tools = new Tools(s, width, graph);
        tools.setPreferredSize( new Dimension(this.getWidth(),90));

        container.add(tools, BorderLayout.NORTH);
        container.add(graph, BorderLayout.CENTER);
        
        this.setContentPane(container);
        
        this.setVisible(true);
        tools.repaint();
	}
}
