Package editor
Class PopupListModel
- java.lang.Object
-
- javax.swing.AbstractListModel
-
- editor.PopupListModel
-
- All Implemented Interfaces:
IIntelliTextModel,java.io.Serializable,javax.swing.ListModel
public abstract class PopupListModel extends javax.swing.AbstractListModel implements IIntelliTextModel
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private Predicate_filterprivate java.lang.String_strFilterPrefix
-
Constructor Summary
Constructors Modifier Constructor Description protectedPopupListModel()protectedPopupListModel(Predicate filter)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract PopupListModelcreateSubset(java.util.List subset)Given the a subset of components in this model, creates a new model containing just this subset.java.lang.ObjectgetElementAt(int iIndex)PredicategetFilter()IIntelliTextModelgetFilteredModel(java.lang.String strPrefix)java.lang.StringgetFilterPrefix()abstract java.util.ListgetModel()Returns the underlying list.java.util.ListgetModelUpdatedOrFilteredByPredicate()Returns the underlying list, filtered by the predicate if it existsintgetSize()abstract java.util.ListgetUnfilteredModel()Returns an unfiltered version of this model.voidsetFilter(Predicate filter)-
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 editor.IIntelliTextModel
getDisplayText, getInsertionTextFrom, getTypeName, parseElement
-
-
-
-
Field Detail
-
_strFilterPrefix
private java.lang.String _strFilterPrefix
-
_filter
private Predicate _filter
-
-
Constructor Detail
-
PopupListModel
protected PopupListModel()
-
PopupListModel
protected PopupListModel(Predicate filter)
-
-
Method Detail
-
createSubset
public abstract PopupListModel createSubset(java.util.List subset)
Given the a subset of components in this model, creates a new model containing just this subset.
-
getModel
public abstract java.util.List getModel()
Returns the underlying list.
-
getUnfilteredModel
public abstract java.util.List getUnfilteredModel()
Returns an unfiltered version of this model. If the model is not filtered, this may return the same reference as getModel().
-
setFilter
public void setFilter(Predicate filter)
-
getFilter
public Predicate getFilter()
-
getSize
public int getSize()
- Specified by:
getSizein interfacejavax.swing.ListModel
-
getElementAt
public java.lang.Object getElementAt(int iIndex)
- Specified by:
getElementAtin interfacejavax.swing.ListModel
-
getFilterPrefix
public java.lang.String getFilterPrefix()
- Specified by:
getFilterPrefixin interfaceIIntelliTextModel
-
getFilteredModel
public IIntelliTextModel getFilteredModel(java.lang.String strPrefix)
- Specified by:
getFilteredModelin interfaceIIntelliTextModel
-
getModelUpdatedOrFilteredByPredicate
public java.util.List getModelUpdatedOrFilteredByPredicate()
Returns the underlying list, filtered by the predicate if it exists
-
-