javax.swing.plaf.metal

Class MetalFileChooserUI.FilterComboBoxModel

protected class MetalFileChooserUI.FilterComboBoxModel extends AbstractListModel implements ComboBoxModel, PropertyChangeListener

A combo box model for the file selection filters.
Field Summary
protected FileFilter[]filters
Storage for the filters in the model.
Constructor Summary
protected FilterComboBoxModel()
Creates a new model.
Method Summary
ObjectgetElementAt(int index)
Returns the item at the specified index.
ObjectgetSelectedItem()
Returns the selected file filter.
intgetSize()
Returns the number of items in the model.
voidpropertyChange(PropertyChangeEvent e)
Handles property changes.
voidsetSelectedItem(Object filter)
Sets the selected filter.

Field Detail

filters

protected FileFilter[] filters
Storage for the filters in the model.

Constructor Detail

FilterComboBoxModel

protected FilterComboBoxModel()
Creates a new model.

Method Detail

getElementAt

public Object getElementAt(int index)
Returns the item at the specified index.

Parameters: index the item index.

Returns: The item at the specified index.

getSelectedItem

public Object getSelectedItem()
Returns the selected file filter.

Returns: The selected file filter.

getSize

public int getSize()
Returns the number of items in the model.

Returns: The number of items in the model.

propertyChange

public void propertyChange(PropertyChangeEvent e)
Handles property changes.

Parameters: e the property change event.

setSelectedItem

public void setSelectedItem(Object filter)
Sets the selected filter.

Parameters: filter the filter (null ignored).