java.awt
Class Component.NativeInLightFixer

java.lang.Object
  extended byjava.awt.Component.NativeInLightFixer
All Implemented Interfaces:
ComponentListener, ContainerListener, EventListener
Enclosing class:
Component

private final class Component.NativeInLightFixer
extends Object
implements ComponentListener, ContainerListener

This odd class is to help out a native component that has been embedded in a lightweight component. Moving lightweight components around and changing their visibility is not seen by the native window system. This is a feature for lightweights, but a problem for native components that depend upon the lightweights. An instance of this class listens to the lightweight parents of an associated native component (the outer class).

Author:
Timothy Prinzing

Field Summary
(package private)  Vector lightParents
           
(package private)  Container nativeHost
           
 
Constructor Summary
(package private) Component.NativeInLightFixer()
           
 
Method Summary
 void componentAdded(ContainerEvent e)
          Invoked when a component has been added to a lightweight parent.
 void componentHidden(ComponentEvent e)
          Invoked when component has been hidden.
 void componentMoved(ComponentEvent e)
          Invoked when one of the lightweight parents has been moved.
 void componentRemoved(ContainerEvent e)
          Invoked when a lightweight parent has been removed.
 void componentResized(ComponentEvent e)
          Invoked when one of the lightweight parents has been resized.
 void componentShown(ComponentEvent e)
          Invoked when a lightweight parent component has been shown.
(package private)  void removeReferences()
          Removes references to this object so it can be garbage collected.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lightParents

Vector lightParents

nativeHost

Container nativeHost
Constructor Detail

Component.NativeInLightFixer

Component.NativeInLightFixer()
Method Detail

componentResized

public void componentResized(ComponentEvent e)
Invoked when one of the lightweight parents has been resized. This doesn't change the position of the native child so it is ignored.

Specified by:
componentResized in interface ComponentListener

componentMoved

public void componentMoved(ComponentEvent e)
Invoked when one of the lightweight parents has been moved. The native peer must be told of the new position which is relative to the native container that is hosting the lightweight components.

Specified by:
componentMoved in interface ComponentListener

componentShown

public void componentShown(ComponentEvent e)
Invoked when a lightweight parent component has been shown. The associated native component must also be shown if it hasn't had an overriding hide done on it.

Specified by:
componentShown in interface ComponentListener

componentHidden

public void componentHidden(ComponentEvent e)
Invoked when component has been hidden.

Specified by:
componentHidden in interface ComponentListener

componentAdded

public void componentAdded(ContainerEvent e)
Invoked when a component has been added to a lightweight parent. This doesn't effect the native component.

Specified by:
componentAdded in interface ContainerListener

componentRemoved

public void componentRemoved(ContainerEvent e)
Invoked when a lightweight parent has been removed. This means the services of this listener are no longer required and it should remove all references (ie registered listeners).

Specified by:
componentRemoved in interface ContainerListener

removeReferences

void removeReferences()
Removes references to this object so it can be garbage collected.