Package java.awt

Examples of java.awt.Window.addComponentListener()


            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

            }
          };
          // fix for defect 225 - install the listener only on
          // JFrames.
          if (parent instanceof JFrame) {
            currWindow
                .addComponentListener(substanceWindowComponentListener);
          }

          SubstanceRootPaneUI.this.window = currWindow;
        }
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);
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) {
      uninstallAndHide();
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

        @Override
    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
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.