Bridges > Java Export Bridge > Appendix - IDL Java Object API > JIDLComponentListener

# JIDLComponentListener

## Declaration

public interface JIDLComponentListener

## All Known Implementing Classes:

JIDLCanvas

## Description

The listener interface for receiving component events (expose, resize) on a JIDLCanvas.

The class that is interested in handling these events implements this interface (and all the methods it contains). The listener object created from that class is then registered with the JIDLCanvas using the addIDLComponentListener method. The listener is unregistered with the removeIDLComponentListener.

Component events are provided for notification purposes; the JIDLCanvas automatically handles component redraws and resizes internally whether a program registers an additional JIDLComponentListener or not. The JIDLCanvas is itself a JIDLComponentListener and provides default behavior for expose and resize. For an expose event, the default behavior is for the JIDLCanvas to call the IDL program’s OnExpose method. For a resize, the default is to call the IDL program’s OnResize method.

Note: Clients should not register to listen to JIDLCanvas ComponentEvents using a ComponentListener, preferring the JIDLComponentListener instead.

#### See Also:

java.awt.event.ComponentEvent, java.awt.event.ComponentListener

### Member Summary

#### Methods

void

IDLcomponentExposed(JIDLObjectI obj)

The IDL component (JIDLCanvas) has been exposed.

##### void

IDLcomponentResized(JIDLObjectI obj, java.awt.event.ComponentEvent event)

The IDL component (JIDLCanvas) has been resized.

## Methods

### IDLcomponentExposed(JIDLObjectI)

public void IDLcomponentExposed(com.idl.javaidl.JIDLObjectI obj)

The IDL component (JIDLCanvas) has been exposed.

The default behavior of JIDLCanvas’s default IDLcomponentExposed is to the IDL program’s OnExpose method.

#### Parameters:

obj - The object that has been resized

### IDLcomponentResized(JIDLObjectI, ComponentEvent)

public void IDLcomponentResized(com.idl.javaidl.JIDLObjectI obj, java.awt.event.ComponentEvent event)

The IDL component (JIDLCanvas) has been resized.

The default behavior of JIDLCanvas’s default IDLcomponentResized is to call the IDL program’s OnResize method.

#### Parameters:

obj - The object that has been resized

event - The Component event