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)
  {
    setTitle("DFT");
    setSize(width + 20, 500);
    setLocationRelativeTo(null);
    setDefaultCloseOperation(1);
    
    this.container.setLayout(new BorderLayout());
    
    this.graph = new Graph();
    this.tools = new Tools(s, width, this.graph);
    this.tools.setPreferredSize(new Dimension(getWidth(), 90));
    
    this.container.add(this.tools, "North");
    this.container.add(this.graph, "Center");
    
    setContentPane(this.container);
    
    setVisible(true);
    this.tools.repaint();
  }
}





