Package jadex.commons.gui.autocombo
Class AbstractAutoComboModel<T>
- java.lang.Object
-
- javax.swing.AbstractListModel
-
- jadex.commons.gui.autocombo.AbstractAutoComboModel<T>
-
- All Implemented Interfaces:
java.io.Serializable
,javax.swing.ComboBoxModel
,javax.swing.ListModel
- Direct Known Subclasses:
AbstractFixedAutoComboModel
,ClassComboModel
,StringComboModel
public abstract class AbstractAutoComboModel<T> extends javax.swing.AbstractListModel implements javax.swing.ComboBoxModel
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractAutoComboModel(AutoCompleteCombo<T> combo, int max)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addToTop(java.lang.String val)
void
addValToTop(T val)
boolean
contains(java.lang.String val)
boolean
containsVal(T val)
abstract T
convertFromString(java.lang.String val)
abstract java.lang.String
convertToString(T val)
abstract ISubscriptionIntermediateFuture<T>
doSetPattern(java.lang.String pattern)
protected void
fireChangeEvents(int size1, int size2)
AutoCompleteCombo<T>
getCombo()
Get the combo.T
getElementAt(int index)
T
getModelValue(java.lang.String text)
Get value from model that equals converted value.java.lang.Object
getSelectedItem()
int
getSize()
ISubscriptionIntermediateFuture<T>
setPattern(java.lang.String pattern)
void
setSelectedItem(java.lang.Object obj)
void
setSelectedItemQuiet(java.lang.Object obj)
-
Methods inherited from class javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
-
-
-
-
Field Detail
-
selected
protected T selected
-
max
protected int max
-
entries
protected java.util.List<T> entries
-
combo
protected AutoCompleteCombo<T> combo
-
-
Constructor Detail
-
AbstractAutoComboModel
public AbstractAutoComboModel(AutoCompleteCombo<T> combo, int max)
-
-
Method Detail
-
convertFromString
public abstract T convertFromString(java.lang.String val)
-
convertToString
public abstract java.lang.String convertToString(T val)
-
addToTop
public void addToTop(java.lang.String val)
-
contains
public boolean contains(java.lang.String val)
-
addValToTop
public void addValToTop(T val)
-
getSelectedItem
public java.lang.Object getSelectedItem()
- Specified by:
getSelectedItem
in interfacejavax.swing.ComboBoxModel<T>
-
setSelectedItem
public void setSelectedItem(java.lang.Object obj)
- Specified by:
setSelectedItem
in interfacejavax.swing.ComboBoxModel<T>
-
setSelectedItemQuiet
public void setSelectedItemQuiet(java.lang.Object obj)
-
getSize
public int getSize()
- Specified by:
getSize
in interfacejavax.swing.ListModel<T>
-
getElementAt
public T getElementAt(int index)
- Specified by:
getElementAt
in interfacejavax.swing.ListModel<T>
-
containsVal
public boolean containsVal(T val)
-
getCombo
public AutoCompleteCombo<T> getCombo()
Get the combo.- Returns:
- The combo.
-
setPattern
public ISubscriptionIntermediateFuture<T> setPattern(java.lang.String pattern)
-
doSetPattern
public abstract ISubscriptionIntermediateFuture<T> doSetPattern(java.lang.String pattern)
-
getModelValue
public T getModelValue(java.lang.String text)
Get value from model that equals converted value.
-
fireChangeEvents
protected void fireChangeEvents(int size1, int size2)
-
-