@Override
    public final void processComponent(String propertyName, final JComponent component) {

        final AbstractOverlayHandler overlayHandler = this.createOverlayHandler(propertyName, component);

        // Wait until has parent and overlay is correctly installed
        final PropertyChangeListener wait4ParentListener = new PropertyChangeListener() {

            public void propertyChange(PropertyChangeEvent e) {

                final JComponent targetComponent = overlayHandler.getTargetComponent();
                final JComponent overlay = overlayHandler.getOverlay();

                // Install overlay
                final int position = AbstractOverlayFormComponentInterceptor.this.getPosition();
                final Boolean success = AbstractOverlayFormComponentInterceptor.this.//
                        getOverlayService().installOverlay(targetComponent, overlay, position, null);

                if (success) {
                    targetComponent.removePropertyChangeListener(//
                            AbstractOverlayFormComponentInterceptor.ANCESTOR_PROPERTY, this);
                }
            }
        };

        component.addPropertyChangeListener(//
                AbstractOverlayFormComponentInterceptor.ANCESTOR_PROPERTY, wait4ParentListener);
    }
@ Override public final void processComponent ( String propertyName , final JComponent component ) { final AbstractOverlayHandler overlayHandler = this . createOverlayHandler ( propertyName , component ) ; final PropertyChangeListener wait4ParentListener = new PropertyChangeListener ( ) { public void propertyChange ( PropertyChangeEvent e ) { final JComponent targetComponent = overlayHandler . getTargetComponent ( ) ; final JComponent overlay = overlayHandler . getOverlay ( ) ; final int position = AbstractOverlayFormComponentInterceptor . this . getPosition ( ) ; final Boolean success = AbstractOverlayFormComponentInterceptor . this . getOverlayService ( ) . installOverlay ( targetComponent , overlay , position , null ) ; if ( success ) { targetComponent . removePropertyChangeListener ( AbstractOverlayFormComponentInterceptor . ANCESTOR_PROPERTY , this ) ; } } } ; component . addPropertyChangeListener ( AbstractOverlayFormComponentInterceptor . ANCESTOR_PROPERTY , wait4ParentListener ) ; }
Creates an overlay handler for the given property name and component and installs the overlay.

@param propertyName
the property name.

@param component
the component.

@see OverlayService#installOverlay(JComponent, JComponent)