org.jminor.common.model.combobox
Interface FilteredComboBoxModel<T>

All Superinterfaces:
ComboBoxModel, FilteredModel<T>, ListModel, Refreshable
All Known Subinterfaces:
EntityComboBoxModel
All Known Implementing Classes:
DefaultEntityComboBoxModel, DefaultFilteredComboBoxModel, DefaultPropertyComboBoxModel

public interface FilteredComboBoxModel<T>
extends FilteredModel<T>, ComboBoxModel, Refreshable

A ComboBoxModel extension that allows filtering via FilterCriteria objects.

See Also:
FilterCriteria, FilteredModel.setFilterCriteria(org.jminor.common.model.FilterCriteria)

Method Summary
 void addItem(T item)
           
 void addSelectionListener(ActionListener listener)
           
 String getNullValueString()
           
 boolean isCleared()
           
 boolean isNullValueSelected()
           
 void removeItem(T item)
          Removes the given item from this model
 void removeSelectionListener(ActionListener listener)
           
 void setContents(Collection<T> contents)
           
 void setNullValueString(String nullValueString)
          Sets the nullValueItem, a refresh is required for it to show up
 
Methods inherited from interface org.jminor.common.model.FilteredModel
addFilteringListener, contains, filterContents, getAllItems, getFilterCriteria, getFilteredItemCount, getFilteredItems, getVisibleItemCount, getVisibleItems, isFiltered, isVisible, removeFilteringListener, setFilterCriteria
 
Methods inherited from interface javax.swing.ComboBoxModel
getSelectedItem, setSelectedItem
 
Methods inherited from interface javax.swing.ListModel
addListDataListener, getElementAt, getSize, removeListDataListener
 
Methods inherited from interface org.jminor.common.model.Refreshable
clear, refresh
 

Method Detail

addSelectionListener

void addSelectionListener(ActionListener listener)
Parameters:
listener - a listener notified each time the selection changes

removeSelectionListener

void removeSelectionListener(ActionListener listener)
Parameters:
listener - a selection listener to remove

setContents

void setContents(Collection<T> contents)
Parameters:
contents - the contents to display in this combo box model

addItem

void addItem(T item)
Parameters:
item - the item to add

removeItem

void removeItem(T item)
Removes the given item from this model

Parameters:
item - the item to remove

isCleared

boolean isCleared()
Returns:
true if the model data needs to be refreshed

isNullValueSelected

boolean isNullValueSelected()
Returns:
true if a value representing null is selected

setNullValueString

void setNullValueString(String nullValueString)
Sets the nullValueItem, a refresh is required for it to show up

Parameters:
nullValueString - a String representing a null value

getNullValueString

String getNullValueString()
Returns:
the String representing the null value, null if none has been specified