javax.swing.event

Interface ListDataListener

public interface ListDataListener extends EventListener

A ListDataListener can register with a {@link ListModel} and receive notification of updates to the model.
Method Summary
voidcontentsChanged(ListDataEvent event)
Notifies the listener that the contents of the list have changed in some way.
voidintervalAdded(ListDataEvent event)
Notifies the listener that one or more items have been added to the list.
voidintervalRemoved(ListDataEvent event)
Notifies the listener that one or more items have been removed from the list.

Method Detail

contentsChanged

public void contentsChanged(ListDataEvent event)
Notifies the listener that the contents of the list have changed in some way. This method will be called if the change cannot be notified via the {@link #intervalAdded(ListDataEvent)} or the {@link #intervalRemoved(ListDataEvent)} methods.

Parameters: event the event.

intervalAdded

public void intervalAdded(ListDataEvent event)
Notifies the listener that one or more items have been added to the list. The event argument can supply the indices for the range of items added.

Parameters: event the event.

intervalRemoved

public void intervalRemoved(ListDataEvent event)
Notifies the listener that one or more items have been removed from the list. The event argument can supply the indices for the range of items removed.

Parameters: event the event.