

//
// Core Program for TETDM 
// PopUpForSetting.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 PopUpForSetting extends JFrame
{
	SettingPanel settingPanel;
	Container pane = getContentPane();
	
	String windowName = "SETTING";	
		
	PopUpForSetting(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);
		
		settingPanel = new SettingPanel(sp1, control);

		pane.add(settingPanel);		
		setVisible(true);
	}
	
	class MyWindowListener extends WindowAdapter {
		public void windowClosing(WindowEvent e) 
		{
			//System.out.println("windowClosing");
			
			settingPanel.closeWindow();
		}
	}	
}
