Class FileSuggestModel
- java.lang.Object
-
- javax.swing.AbstractListModel<T>
-
- io.github.jonestimd.swing.list.BeanListModel<T>
-
- io.github.jonestimd.swing.component.BeanListComboBoxModel<java.io.File>
-
- io.github.jonestimd.swing.component.FileSuggestModel
-
- All Implemented Interfaces:
LazyLoadComboBoxModel<java.io.File>
,LazyLoadListModel<java.io.File>
,SuggestModel<java.io.File>
,java.io.Serializable
,java.lang.Iterable<java.io.File>
,javax.swing.ComboBoxModel<java.io.File>
,javax.swing.ListModel<java.io.File>
,javax.swing.MutableComboBoxModel<java.io.File>
public class FileSuggestModel extends BeanListComboBoxModel<java.io.File> implements SuggestModel<java.io.File>
The model for aFileSuggestField
. Provides a list of files and/or directories based on the current field value.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FileSuggestModel(java.io.File startDirectory, java.util.function.Predicate<java.io.File> filePredicate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.File
updateSuggestions(java.lang.String editorText)
Update the elements in this model and return the selected item.-
Methods inherited from class io.github.jonestimd.swing.component.BeanListComboBoxModel
getSelectedItem, removeAll, setElements, setSelectedItem
-
Methods inherited from class io.github.jonestimd.swing.list.BeanListModel
addAllElements, addElement, addMissingElements, contains, getElementAt, getSize, indexOf, insertElementAt, iterator, removeElement, removeElementAt, setElements
-
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 io.github.jonestimd.swing.component.LazyLoadComboBoxModel
addElement, addMissingElements, indexOf, setElements
-
-
-
-
Method Detail
-
updateSuggestions
public java.io.File updateSuggestions(java.lang.String editorText)
Description copied from interface:SuggestModel
Update the elements in this model and return the selected item.- Specified by:
updateSuggestions
in interfaceSuggestModel<java.io.File>
- Parameters:
editorText
- the current editor text- Returns:
- the selected item based on the editor text
-
-