

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

package source;

import source.*;

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

public class PopUpForNavigation extends JFrame
{
    NavigationPanel navigationPanel;
	Container pane = getContentPane();	
		
	PopUpForNavigation(Control control, int X, int Y, int width, int height, Navigation navigation)
	{
		super("Navigation");
		pane.setLayout(new BorderLayout());
		
		setBounds(X, Y, width, height);
//		setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
		
		setAlwaysOnTop(true);
		pane.setBackground(Color.white);
//		setUndecorated(true);
		
        navigationPanel = new NavigationPanel(control);
		this.addWindowListener(new MyWindowListener());
		pane.add(navigationPanel);
		setVisible(true);
	}
	
	class MyWindowListener extends WindowAdapter {
		public void windowClosing(WindowEvent e)
		{
			//System.out.println("windowClosing");

			navigationPanel.closeWindow();
//			navivationPanel.closePopForNavigation();
		}
	}
}
