Package javax.swing.event

Examples of javax.swing.event.AncestorListener


                componentsData.remove ( component );
                componentKeysCache.remove ( component );
                if ( component instanceof JComponent )
                {
                    final JComponent jComponent = ( JComponent ) component;
                    final AncestorListener listener = componentsListeners.get ( jComponent );
                    jComponent.removeAncestorListener ( listener );
                    componentsListeners.remove ( component );
                }
            }
        }
View Full Code Here


                        fadeTimer.stop ();
                    }
                }
            }
        } );
        addAncestorListener ( new AncestorListener ()
        {
            @Override
            public void ancestorAdded ( final AncestorEvent event )
            {
                // Updating tooltip hotkey
View Full Code Here

                        showCalendarPopup ();
                    }
                }
            }
        } );
        addAncestorListener ( new AncestorListener ()
        {
            @Override
            public void ancestorAdded ( final AncestorEvent event )
            {
                hideCalendarPopup ();
View Full Code Here

     * Used to give focus to password field, instead of the default OK button in
     * the confirmation dialog.
     */
    private static class RequestFocusListener implements AncestorListener {
        public void ancestorAdded(final AncestorEvent e) {
            final AncestorListener al = this;
            SwingUtilities.invokeLater(new Runnable() {

                @Override
                public void run() {
                    JComponent component = e.getComponent();
View Full Code Here

    public void focusGained(FocusEvent e) {
    getComboBox().requestFocusInWindow();
    }
  });

  addAncestorListener(new AncestorListener() {
    public void ancestorAdded(AncestorEvent event) {
    setPopupVisible(false);
    }

    public void ancestorRemoved(AncestorEvent event) {
View Full Code Here

                // add window resize listener
                Window w = SwingUtilities.getWindowAncestor(this);
                if (w != null) {
                    w.addComponentListener(componentAdapter);
                } else {
                    addAncestorListener(new AncestorListener() {
                        public void ancestorAdded(AncestorEvent event) {
                            Window w = SwingUtilities.getWindowAncestor(
                                SingleComponentInfiniteProgress.this);
                            if (w != null) {
                                w.addComponentListener(componentAdapter);
View Full Code Here

  /**
   * Installs an ancestor listener that hides the popup on any change.
   */
  protected void installAncestorListener()
  {
    addAncestorListener(new AncestorListener()
    {
      public void ancestorAdded(AncestorEvent event)
      {
        hidePopup();
      }
View Full Code Here

TOP

Related Classes of javax.swing.event.AncestorListener

Copyright © 2018 www.massapicom. 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.