Package javax.swing.event

Examples of javax.swing.event.AncestorListener


            public void actionPerformed(ActionEvent e) {
                browseForFile(pathToEclipsePreferenceFileJS);
            }
        });

        rootComponent.addAncestorListener(new AncestorListener() {
            public void ancestorAdded(AncestorEvent event) {
                // Called when component becomes visible, to ensure that the
                // popups
                // are visible when the form is shown for the first time.
                updateComponents();
View Full Code Here


                if (counter == initialIndex) {
                    initialFocusComponent = newComponent;
                    if (initialFocusComponent instanceof JButton) {
                        JButton defaultB = (JButton) initialFocusComponent;
                        defaultB.addAncestorListener(new AncestorListener() {
                            public void ancestorAdded(AncestorEvent e) {
                                JButton defaultButton = (JButton) e.getComponent();
                                JRootPane root = SwingUtilities.getRootPane(defaultButton);
                                if (root != null) {
                                    root.setDefaultButton(defaultButton);
View Full Code Here

      public void actionPerformed(ActionEvent e) {
        browseForFile(pathToEclipsePreferenceFileJS);
      }
    });

    rootComponent.addAncestorListener(new AncestorListener() {
      public void ancestorAdded(AncestorEvent event) {
        // Called when component becomes visible, to ensure that the
        // popups
        // are visible when the form is shown for the first time.
        updateComponents();
View Full Code Here

      public void actionPerformed(ActionEvent e) {
        browseForFile(eclipsePrefs);
      }
    });

    rootComponent.addAncestorListener(new AncestorListener() {
      public void ancestorAdded(AncestorEvent event) {
        // Called when component becomes visible, to ensure that the popups
        // are visible when the form is shown for the first time.
        updateComponents();
      }
View Full Code Here

    }
    else {
      editor.mapChanged(start.getMap());
    }
    editor.addAncestorListener(new AncestorListener() {
      public void ancestorAdded(final AncestorEvent event) {
        final Component component = event.getComponent();
        final Window windowAncestor = SwingUtilities.getWindowAncestor(component);
        if(windowAncestor.isFocused())
          editor.focusInputField(true);
View Full Code Here

          super.actionPerformed(event);
        }
    }

      private void changeFocusWhenVisibilityChanges(final JComponent toolBar) {
        quickEditor.addAncestorListener(new AncestorListener() {
          public void ancestorAdded(final AncestorEvent event) {
            quickEditor.focusInputField(true);
            quickEditor.removeAncestorListener(this);
          }
          public void ancestorMoved(final AncestorEvent event) {
View Full Code Here

//      }
//      return getController(JOptionPane.getFrameForComponent(rootPane));
//    }

  public static void focusOn(JComponent component) {
    component.addAncestorListener(new AncestorListener() {
      public void ancestorRemoved(AncestorEvent event) {
      }

      public void ancestorMoved(AncestorEvent event) {
      }
View Full Code Here

        this.waitComponent = waitComponent;
        add(waitComponent, BorderLayout.CENTER);

        // Starts loading the component when this panel has become visible on screen
        addAncestorListener(new AncestorListener() {

            public void ancestorAdded(AncestorEvent e) {
                if(visibleOnScreen)
                    return;
View Full Code Here

                add(leftDragger, BorderLayout.WEST);
                add(rightDragger, BorderLayout.EAST);
            }
        }

        addAncestorListener(new AncestorListener() { //2006/12/19 : reworked to avoid GC leak
            public void ancestorAdded(AncestorEvent event) {
                AutoHidePolicy.getPolicy().addPropertyChangeListener(controler);
                if (DockingPreferences.isLightWeightUsageEnabled()) {
                    KeyboardFocusManager.getCurrentKeyboardFocusManager().addPropertyChangeListener(
                            "focusOwner", collapser);
View Full Code Here

   
    installKeyboardBindings();
   
    // optional window following
    final boolean floatingContainerFollowParentWindow = UIManager.getBoolean("FloatingContainer.followParentWindow");
    addAncestorListener(new AncestorListener(){
      public void ancestorAdded(AncestorEvent event) {
        KeyboardFocusManager.getCurrentKeyboardFocusManager().addPropertyChangeListener(
            "focusOwner", focusHandler); //2006/08/21 : back to life (was in comments in 2.1.0)
        // 2006/12/19 now integrated to ancestor hierarchy to avoid gc leaks
       
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.