- java.lang.Object
-
- javax.swing.AbstractListModel<Object>
-
- javax.swing.plaf.metal.MetalFileChooserUI.FilterComboBoxModel
-
- All Implemented Interfaces:
- PropertyChangeListener, Serializable, EventListener, ComboBoxModel<Object>, ListModel<Object>
- Enclosing class:
- MetalFileChooserUI
protected class MetalFileChooserUI.FilterComboBoxModel extends AbstractListModel<Object> implements ComboBoxModel<Object>, PropertyChangeListener
Data model for a type-face selection combo-box.
-
-
Field Summary
Fields Modifier and Type Field and Description protected FileFilter[]filters-
Fields inherited from class javax.swing.AbstractListModel
listenerList
-
-
Constructor Summary
Constructors Modifier Constructor and Description protectedMetalFileChooserUI.FilterComboBoxModel()
-
Method Summary
Methods Modifier and Type Method and Description ObjectgetElementAt(int index)Returns the value at the specified index.ObjectgetSelectedItem()Returns the selected itemintgetSize()Returns the length of the list.voidpropertyChange(PropertyChangeEvent e)This method gets called when a bound property is changed.voidsetSelectedItem(Object filter)Set the selected item.-
Methods inherited from class javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.swing.ListModel
addListDataListener, removeListDataListener
-
-
-
-
Field Detail
-
filters
protected FileFilter[] filters
-
-
Constructor Detail
-
MetalFileChooserUI.FilterComboBoxModel
protected MetalFileChooserUI.FilterComboBoxModel()
-
-
Method Detail
-
propertyChange
public void propertyChange(PropertyChangeEvent e)
Description copied from interface:PropertyChangeListenerThis method gets called when a bound property is changed.- Specified by:
propertyChangein interfacePropertyChangeListener- Parameters:
e- A PropertyChangeEvent object describing the event source and the property that has changed.
-
setSelectedItem
public void setSelectedItem(Object filter)
Description copied from interface:ComboBoxModelSet the selected item. The implementation of this method should notify all registeredListDataListeners that the contents have changed.- Specified by:
setSelectedItemin interfaceComboBoxModel<Object>- Parameters:
filter- the list object to select ornullto clear the selection
-
getSelectedItem
public Object getSelectedItem()
Description copied from interface:ComboBoxModelReturns the selected item- Specified by:
getSelectedItemin interfaceComboBoxModel<Object>- Returns:
- The selected item or
nullif there is no selection
-
getSize
public int getSize()
Description copied from interface:ListModelReturns the length of the list.
-
getElementAt
public Object getElementAt(int index)
Description copied from interface:ListModelReturns the value at the specified index.- Specified by:
getElementAtin interfaceListModel<Object>- Parameters:
index- the requested index- Returns:
- the value at
index
-
-
Traduction non disponible
Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Version en cache
09/10/2025 23:37:35 Cette version de la page est en cache (à la date du 09/10/2025 23:37:35) afin d'accélérer le traitement.Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la version plus récente de la page.
Document créé le 07/12/2006, dernière modification le 04/03/2020
Source du document imprimé : https://www.gaudry.be/java-api-rf-javax/swing/plaf/metal/MetalFileChooserUI.FilterComboBoxModel.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.