Package java.awt

Examples of java.awt.Window.addWindowListener()


              });
            }
          };

          if (!(parent instanceof JInternalFrame)) {
            currWindow.addWindowListener(substanceWindowListener);
          }

          // fix for defect 213 - maximizing frame under multiple
          // screens shouldn't always use insets of the primary
          // screen.
View Full Code Here


        public void addNotify() {
            super.addNotify();
            Window w = SwingUtilities.getWindowAncestor(this);
            setSize(getParent().getSize());
            w.addComponentListener(listener);
            w.addWindowListener(listener);
        }

        public void removeNotify() {
            Window w = SwingUtilities.getWindowAncestor(this);
            w.removeComponentListener(listener);
View Full Code Here

      });

      // If anything happens to the "parent" window, hide this popup
      Window parent = (Window)getParent();
      parent.addWindowFocusListener(this);
      parent.addWindowListener(this);
      parent.addComponentListener(this);

    }

    public void componentResized(ComponentEvent e) {
View Full Code Here

        public void addNotify() {
            super.addNotify();
            Window w = SwingUtilities.getWindowAncestor(this);
            setSize(getParent().getSize());
            w.addComponentListener(listener);
            w.addWindowListener(listener);
            Toolkit.getDefaultToolkit().addAWTEventListener(listener, AWTEvent.MOUSE_EVENT_MASK|AWTEvent.MOUSE_MOTION_EVENT_MASK);
        }

        public void removeNotify() {
            Toolkit.getDefaultToolkit().removeAWTEventListener(listener);
View Full Code Here

    public void addNotify() {
            super.addNotify();
            Window w = SwingUtilities.getWindowAncestor(this);
            setSize(getParent().getSize());
            w.addComponentListener(listener);
            w.addWindowListener(listener);
            Toolkit.getDefaultToolkit().addAWTEventListener(listener, AWTEvent.MOUSE_EVENT_MASK|AWTEvent.MOUSE_MOTION_EVENT_MASK);
        }

        @Override
    public void removeNotify() {
View Full Code Here

    size.width = size.width * 80 / 100;
    size.height = size.height * 80 / 100;
    Window window = (Window)webBrowserWindow;
    window.setSize(size);
    window.setLocationByPlatform(true);
    window.addWindowListener(new WindowAdapter() {
      @Override
      public void windowOpened(WindowEvent e) {
        webBrowserWindowStrategy.getWebBrowser().requestFocus();
      }
    });
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.