javax.swing
public abstract class AbstractListModel extends Object implements ListModel, Serializable
| Field Summary | |
|---|---|
| protected EventListenerList | listenerList List of ListDataListeners called for each change to the list. |
| Constructor Summary | |
|---|---|
| AbstractListModel()
Creates a new model instance - initialises the event listener list. | |
| Method Summary | |
|---|---|
| void | addListDataListener(ListDataListener listener)
Add a listener object to this model. |
| protected void | fireContentsChanged(Object source, int startIndex, int endIndex)
Call ListDataListener#contentsChanged on each element of the
listenerList which is a ListDataListener. |
| protected void | fireIntervalAdded(Object source, int startIndex, int endIndex)
Call ListDataListener#intervalAdded on each element of the
listenerList which is a ListDataListener. |
| protected void | fireIntervalRemoved(Object source, int startIndex, int endIndex)
Call ListDataListener#intervalRemoved on each element of the
listenerList which is a ListDataListener. |
| ListDataListener[] | getListDataListeners()
A synonym for getListeners(ListDataListener.class).
|
| <T extends EventListener> T[] | getListeners(Class<T> listenerType)
Return the subset of EventListener objects found in this
object's listenerList which are elements of the specified
type.
|
| void | removeListDataListener(ListDataListener listener)
Add a listener object to this model. |
Parameters: listener The listener to add
Parameters: source The source of the change, typically this startIndex The index of the first element which changed endIndex The index of the last element which changed
Parameters: source The source of the change, typically this startIndex The index of the first new element endIndex The index of the last new element
Parameters: source The source of the change, typically this startIndex The index of the first element removed endIndex The index of the last element removed
getListeners(ListDataListener.class).
Returns: The set of ListDataListeners found in the listenerList
Parameters: listenerType The type of listeners to select
Returns: The set of listeners of the specified type
Parameters: listener The listener to remove