Package java.awt

Examples of java.awt.Window.addComponentListener()


            if(enable) {
                if(!overlay.isVisible()) {
                    overlay.setLocation(videoSurface.canvas().getLocationOnScreen());
                    overlay.setSize(videoSurface.canvas().getSize());
                    Window window = (Window)SwingUtilities.getAncestorOfClass(Window.class, videoSurface.canvas());
                    window.addComponentListener(overlayComponentAdapter);
                    overlay.setVisible(true);
                }
            }
            else {
                if(overlay.isVisible()) {
View Full Code Here


      if (disposedWindows.containsKey(w)) {
        return true;
      }
      disposedWindows.put(w, true);
      // execute(addComponentListenerTask(w, new DisposalMonitor(disposedWindows)));
      w.addComponentListener(new DisposalMonitor(disposedWindows));
      return false;
    }
    disposedWindows.remove(windowEvent.getWindow());
    return false;
  }
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() {
View Full Code Here

        bt.setWindowMask();
        bt.setVisible(true);
        owner.addFocusListener(focusEar);
        owner.addMouseListener(mouseEar);
        parent.addMouseListener(mouseEar);
        parent.addComponentListener(componentEar);
        hidePopupTimer.start();
        isShowing = true;
      }
     
      /*
 
View Full Code Here

    if (eventId == WINDOW_CLOSED) {
      Window w = windowEvent.getWindow();
      if (disposedWindows.containsKey(w)) return true;
      disposedWindows.put(w, true);
      // execute(addComponentListenerTask(w, new DisposalMonitor(disposedWindows)));
      w.addComponentListener(new DisposalMonitor(disposedWindows));
      return false;
    }
    disposedWindows.remove(windowEvent.getWindow());
    return false;
  }
View Full Code Here

  @SuppressWarnings("serial")
    public SModeController(final Controller controller) {
    super(controller);
    final Window dialog = ((DialogController) controller.getViewController()).getDialog();
    dialog.addComponentListener(new ComponentAdapter() {
      public void componentShown(final ComponentEvent e) {
        status = JOptionPane.DEFAULT_OPTION;
      }
    });
    final String key = "styledialog";
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() {
View Full Code Here

        }
        Window window = getComponentWindow(client);
        if (window == null) {
            return;
        }
        window.addComponentListener(this);
        window.addWindowListener(this);
        clientWindowListened = window;
    }

    private synchronized void removeClientWindowListeners() {
View Full Code Here

            menuBars.add(menuBar);

            Window w = SwingUtilities.getWindowAncestor(menuBar);
            if (w != null) {
                w.addWindowListener(this);
                w.addComponentListener(this);
            }
        }

        public void removeMenuBar(final JMenuBar menuBar) {
            menuBars.remove(menuBar);
View Full Code Here

            menuBars.remove(menuBar);

            Window w = SwingUtilities.getWindowAncestor(menuBar);
            if (w != null) {
                w.removeWindowListener(this);
                w.addComponentListener(this);
            }
        }

        public void actionPerformed(final ActionEvent e) {
            Component c = KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusOwner();
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.