package source;

import javax.swing.*;
import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

public class PopUpForWordToolSelect extends JFrame {
    WordToolWindow wordToolWindow;
    Container pane = getContentPane();

    PopUpForWordToolSelect(Control control, int X, int Y, int width, int height)
    {
        super("ToolSelectTree");
        pane.setLayout(new BorderLayout());

        setBounds(X, Y, width, height);
//		setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);

        setAlwaysOnTop(true);
        pane.setBackground(Color.white);
//		setUndecorated(true);


        wordToolWindow = new WordToolWindow(control);
        this.addWindowListener(new PopUpForWordToolSelect.MyWindowListener());
        pane.add(wordToolWindow);
        setVisible(true);
    }

    class MyWindowListener extends WindowAdapter {
        public void windowClosing(WindowEvent e)
        {
            //System.out.println("windowClosing");

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