java.awt.event
Class ComponentAdapter

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.awt.event.ComponentAdapter
All Implemented Interfaces:
ComponentListener sample code for java.awt.event.ComponentListener definition code for java.awt.event.ComponentListener , EventListener sample code for java.util.EventListener definition code for java.util.EventListener
Direct Known Subclasses:
BasicSliderUI.ComponentHandler sample code for javax.swing.plaf.basic.BasicSliderUI.ComponentHandler definition code for javax.swing.plaf.basic.BasicSliderUI.ComponentHandler , BasicTreeUI.ComponentHandler sample code for javax.swing.plaf.basic.BasicTreeUI.ComponentHandler definition code for javax.swing.plaf.basic.BasicTreeUI.ComponentHandler , JViewport.ViewListener sample code for javax.swing.JViewport.ViewListener definition code for javax.swing.JViewport.ViewListener

public abstract class ComponentAdapter
extends Object sample code for java.lang.Object definition code for java.lang.Object
implements ComponentListener sample code for java.awt.event.ComponentListener definition code for java.awt.event.ComponentListener

An abstract adapter class for receiving component events. The methods in this class are empty. This class exists as convenience for creating listener objects.

Extend this class to create a ComponentEvent listener and override the methods for the events of interest. (If you implement the ComponentListener interface, you have to define all of the methods in it. This abstract class defines null methods for them all, so you can only have to define methods for events you care about.)

Create a listener object using your class and then register it with a component using the component's addComponentListener method. When the component's size, location, or visibility changes, the relevant method in the listener object is invoked, and the ComponentEvent is passed to it.

Since:
1.1
See Also:
ComponentEvent sample code for java.awt.event.ComponentEvent definition code for java.awt.event.ComponentEvent , ComponentListener sample code for java.awt.event.ComponentListener definition code for java.awt.event.ComponentListener , Tutorial: Writing a Component Listener, Reference: The Java Class Libraries (update file)

Constructor Summary
ComponentAdapter sample code for java.awt.event.ComponentAdapter.ComponentAdapter() definition code for java.awt.event.ComponentAdapter.ComponentAdapter() ()
           
 
Method Summary
 void componentHidden sample code for java.awt.event.ComponentAdapter.componentHidden(java.awt.event.ComponentEvent) definition code for java.awt.event.ComponentAdapter.componentHidden(java.awt.event.ComponentEvent) (ComponentEvent sample code for java.awt.event.ComponentEvent definition code for java.awt.event.ComponentEvent  e)
          Invoked when the component has been made invisible.
 void componentMoved sample code for java.awt.event.ComponentAdapter.componentMoved(java.awt.event.ComponentEvent) definition code for java.awt.event.ComponentAdapter.componentMoved(java.awt.event.ComponentEvent) (ComponentEvent sample code for java.awt.event.ComponentEvent definition code for java.awt.event.ComponentEvent  e)
          Invoked when the component's position changes.
 void componentResized sample code for java.awt.event.ComponentAdapter.componentResized(java.awt.event.ComponentEvent) definition code for java.awt.event.ComponentAdapter.componentResized(java.awt.event.ComponentEvent) (ComponentEvent sample code for java.awt.event.ComponentEvent definition code for java.awt.event.ComponentEvent  e)
          Invoked when the component's size changes.
 void componentShown sample code for java.awt.event.ComponentAdapter.componentShown(java.awt.event.ComponentEvent) definition code for java.awt.event.ComponentAdapter.componentShown(java.awt.event.ComponentEvent) (ComponentEvent sample code for java.awt.event.ComponentEvent definition code for java.awt.event.ComponentEvent  e)
          Invoked when the component has been made visible.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

ComponentAdapter sample code for java.awt.event.ComponentAdapter() definition code for java.awt.event.ComponentAdapter()

public ComponentAdapter()
Method Detail

componentResized sample code for java.awt.event.ComponentAdapter.componentResized(java.awt.event.ComponentEvent) definition code for java.awt.event.ComponentAdapter.componentResized(java.awt.event.ComponentEvent)

public void componentResized(ComponentEvent sample code for java.awt.event.ComponentEvent definition code for java.awt.event.ComponentEvent  e)
Invoked when the component's size changes.

Specified by:
componentResized sample code for java.awt.event.ComponentListener.componentResized(java.awt.event.ComponentEvent) definition code for java.awt.event.ComponentListener.componentResized(java.awt.event.ComponentEvent) in interface ComponentListener sample code for java.awt.event.ComponentListener definition code for java.awt.event.ComponentListener

componentMoved sample code for java.awt.event.ComponentAdapter.componentMoved(java.awt.event.ComponentEvent) definition code for java.awt.event.ComponentAdapter.componentMoved(java.awt.event.ComponentEvent)

public void componentMoved(ComponentEvent sample code for java.awt.event.ComponentEvent definition code for java.awt.event.ComponentEvent  e)
Invoked when the component's position changes.

Specified by:
componentMoved sample code for java.awt.event.ComponentListener.componentMoved(java.awt.event.ComponentEvent) definition code for java.awt.event.ComponentListener.componentMoved(java.awt.event.ComponentEvent) in interface ComponentListener sample code for java.awt.event.ComponentListener definition code for java.awt.event.ComponentListener

componentShown sample code for java.awt.event.ComponentAdapter.componentShown(java.awt.event.ComponentEvent) definition code for java.awt.event.ComponentAdapter.componentShown(java.awt.event.ComponentEvent)

public void componentShown(ComponentEvent sample code for java.awt.event.ComponentEvent definition code for java.awt.event.ComponentEvent  e)
Invoked when the component has been made visible.

Specified by:
componentShown sample code for java.awt.event.ComponentListener.componentShown(java.awt.event.ComponentEvent) definition code for java.awt.event.ComponentListener.componentShown(java.awt.event.ComponentEvent) in interface ComponentListener sample code for java.awt.event.ComponentListener definition code for java.awt.event.ComponentListener

componentHidden sample code for java.awt.event.ComponentAdapter.componentHidden(java.awt.event.ComponentEvent) definition code for java.awt.event.ComponentAdapter.componentHidden(java.awt.event.ComponentEvent)

public void componentHidden(ComponentEvent sample code for java.awt.event.ComponentEvent definition code for java.awt.event.ComponentEvent  e)
Invoked when the component has been made invisible.

Specified by:
componentHidden sample code for java.awt.event.ComponentListener.componentHidden(java.awt.event.ComponentEvent) definition code for java.awt.event.ComponentListener.componentHidden(java.awt.event.ComponentEvent) in interface ComponentListener sample code for java.awt.event.ComponentListener definition code for java.awt.event.ComponentListener