E
- the type of the elements of this modelComboBoxModel<E>
, MutableComboBoxModel<E>
AbstractListModel
, BasicDirectoryModel
, DefaultComboBoxModel
, DefaultListModel
, MetalFileChooserUI.DirectoryComboBoxModel
, MetalFileChooserUI.FilterComboBoxModel
public interface ListModel<E>
Modifier and Type | Method | Description |
---|---|---|
void |
addListDataListener |
Adds a listener to the list that's notified each time a change to the data model occurs. |
E |
getElementAt |
Returns the value at the specified index. |
int |
getSize() |
Returns the length of the list. |
void |
removeListDataListener |
Removes a listener from the list that's notified each time a change to the data model occurs. |
int getSize()
E getElementAt(int index)
index
- the requested indexindex
void addListDataListener(ListDataListener l)
l
- the ListDataListener
to be addedvoid removeListDataListener(ListDataListener l)
l
- the ListDataListener
to be removed
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/javax/swing/ListModel.html