1 package ij.plugin.frame;
3 import java.awt.event.*;
9 public class PlugInFrame extends JFrame implements
PlugIn, WindowListener, FocusListener {
15 enableEvents(AWTEvent.WINDOW_EVENT_MASK);
18 addWindowListener(
this);
19 addFocusListener(
this);
20 setBackground(Color.white);
21 if (
IJ.debugMode)
IJ.
log(
"opening "+title);
23 Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
24 setLocation(screen.width - 240, (screen.height / 2) - 220);
27 public void run(String arg) {
30 public void windowClosing(WindowEvent e) {
31 if (e.getSource()==
this)
41 public void windowActivated(WindowEvent e) {
44 setJMenuBar(
Menus.getMenuBar());
48 public void focusGained(FocusEvent e) {
52 public void windowOpened(WindowEvent e) {}
53 public void windowClosed(WindowEvent e) {}
54 public void windowIconified(WindowEvent e) {}
55 public void windowDeiconified(WindowEvent e) {}
56 public void windowDeactivated(WindowEvent e) {}
57 public void focusLost(FocusEvent e) {}