

//
// Core Program for TETDM 
// PopUpForModeSetting.java Version 1.00
// Copyright(C) 2012-2018 TETDM CORE MEMBER ALL RIGHTS RESERVED.
// This program is provided under the license.
//

package source;

import java.awt.*;
import java.awt.event.*;
import javax.swing.JFrame;

public class PopUpForModeSetting extends JFrame
{
	ModeSettingPanel modeSettingPanel;
	Container pane = getContentPane();

	String windowName = "MODESETTING";	
		
	PopUpForModeSetting(SettingData sp1, int X, int Y, int width, int height, Control control, String windowTitle)
	{
		super(windowTitle);
		
		pane.setLayout(new BorderLayout());
        
        WINDOWACTIONLOG windowActionLog = new WINDOWACTIONLOG(this, windowName);
        this.addComponentListener(windowActionLog.componentListener);                    //FOR LOG
        this.addWindowListener(new MyWindowListener());
		
		setBounds(X, Y, width, height);
//		setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
		
//		setAlwaysOnTop(true);
		pane.setBackground(Color.white);
//		setUndecorated(true);
		
		modeSettingPanel = new ModeSettingPanel(sp1, control, this);
		pane.add(modeSettingPanel);
		setVisible(true);
	}
	
	class MyWindowListener extends WindowAdapter {
		public void windowClosing(WindowEvent e) 
		{
			//System.out.println("windowClosing");
			
			modeSettingPanel.closeWindow();
		}
	}	
}
