//
// Core Program for TETDM 
// MainFrame.java Version 0.19
// Copyright(C) 2011 TETDM CORE MEMBER ALL RIGHTS RESERVED.
// This program is provided under the license.
//


package source;

import source.*;
import source.TextData.*;

import java.awt.*;
import java.awt.BorderLayout;
import java.awt.Container;

import javax.swing.JFrame;


//MAIN FRAME
public class MainFrame extends JFrame
{
	public int windowSizeX, windowSizeY;	
	
	Control controlPanel;
	Container pane = getContentPane();

	MainFrame(String title, String filename, String absolutePath)
	{
		super(title);
		pane.setLayout(new BorderLayout());
		
		GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
		DisplayMode displayMode = env.getDefaultScreenDevice().getDisplayMode();
		
		windowSizeX = displayMode.getWidth();
		windowSizeY = displayMode.getHeight() - 100;
		
		setBounds(0,0,windowSizeX,windowSizeY);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

		controlPanel = new Control(this, filename, absolutePath);
		pane.add(controlPanel);
		setVisible(true);
	}
}
