PropertyChangeListener
, Serializable
, EventListener
, ComboBoxModel<Object>
, ListModel<Object>
protected class MetalFileChooserUI.FilterComboBoxModel extends AbstractListModel<Object> implements ComboBoxModel<Object>, PropertyChangeListener
Modifier and Type | Field | Description |
---|---|---|
protected FileFilter[] |
filters |
An array of file filters.
|
listenerList
Modifier | Constructor | Description |
---|---|---|
protected |
FilterComboBoxModel() |
Constructs an instance of
FilterComboBoxModel . |
Modifier and Type | Method | Description |
---|---|---|
Object |
getElementAt(int index) |
Returns the value at the specified index.
|
Object |
getSelectedItem() |
Returns the selected item
|
int |
getSize() |
Returns the length of the list.
|
void |
propertyChange(PropertyChangeEvent e) |
This method gets called when a bound property is changed.
|
void |
setSelectedItem(Object filter) |
Set the selected item.
|
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
addListDataListener, removeListDataListener
protected FileFilter[] filters
protected FilterComboBoxModel()
FilterComboBoxModel
.public void propertyChange(PropertyChangeEvent e)
PropertyChangeListener
propertyChange
in interface PropertyChangeListener
e
- A PropertyChangeEvent object describing the event source
and the property that has changed.public void setSelectedItem(Object filter)
ComboBoxModel
ListDataListener
s that the contents
have changed.setSelectedItem
in interface ComboBoxModel<Object>
filter
- the list object to select or null
to clear the selectionpublic Object getSelectedItem()
ComboBoxModel
getSelectedItem
in interface ComboBoxModel<Object>
null
if there is no selectionpublic int getSize()
ListModel
public Object getElementAt(int index)
ListModel
getElementAt
in interface ListModel<Object>
index
- the requested indexindex
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2017, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.
DRAFT 9-internal+0-adhoc.mlchung.jdk9-jdeps