|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.AbstractListModel com.jidesoft.combobox.DefaultComboBoxModelWrapper
public class DefaultComboBoxModelWrapper
The default implementation of ComboBoxModelWrapper.
Field Summary | |
---|---|
protected int[] |
_indexes
|
protected ComboBoxModel |
_model
|
Fields inherited from class javax.swing.AbstractListModel |
---|
listenerList |
Constructor Summary | |
---|---|
DefaultComboBoxModelWrapper()
|
|
DefaultComboBoxModelWrapper(ComboBoxModel model)
Creates a DefaultComboBoxModelWrapper from any list model. |
Method Summary | |
---|---|
void |
contentsChanged(ListDataEvent e)
The event handler when items are updated in the underlying combo box model. |
int |
getActualIndexAt(int row)
Gets the actual row. |
ComboBoxModel |
getActualModel()
Gets the actual list model. |
Object |
getElementAt(int row)
|
int |
getIndexAt(int actualRow)
Gets the visual row. |
int[] |
getIndexes()
Gets the indexes that maps from the visual row index to the actual row index. |
Object |
getSelectedItem()
|
int |
getSize()
|
void |
intervalAdded(ListDataEvent e)
The event handler when new items are added in the underlying combo box model. |
void |
intervalRemoved(ListDataEvent e)
The event handler when items are removed in the underlying combo box model. |
protected void |
reallocateIndexes()
Resets the index mapping. |
void |
setActualModel(ComboBoxModel model)
Sets the actual list model. |
void |
setIndexes(int[] indexes)
Sets the indexes of the row mapping. |
void |
setSelectedItem(Object anObject)
Set the value of 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 |
---|
protected ComboBoxModel _model
protected int[] _indexes
Constructor Detail |
---|
public DefaultComboBoxModelWrapper()
public DefaultComboBoxModelWrapper(ComboBoxModel model)
model
- the underlying combo box modelMethod Detail |
---|
public void setActualModel(ComboBoxModel model)
setActualModel
in interface ComboBoxModelWrapper
model
- the list model.public ComboBoxModel getActualModel()
getActualModel
in interface ComboBoxModelWrapper
public int getActualIndexAt(int row)
getActualIndexAt
in interface ComboBoxModelWrapper
row
- the row on the UI.
public int getIndexAt(int actualRow)
getIndexAt
in interface ComboBoxModelWrapper
actualRow
- the actual row in actual model.
public Object getElementAt(int row)
getElementAt
in interface ListModel
public int getSize()
getSize
in interface ListModel
protected void reallocateIndexes()
public int[] getIndexes()
getIndexes
in interface ComboBoxModelWrapper
public void setIndexes(int[] indexes)
setIndexes
in interface ComboBoxModelWrapper
indexes
- the indexespublic void setSelectedItem(Object anObject)
setSelectedItem
in interface ComboBoxModel
anObject
- The combo box value or null for no selection.public Object getSelectedItem()
getSelectedItem
in interface ComboBoxModel
public void intervalAdded(ListDataEvent e)
intervalAdded
in interface ListDataListener
e
- the eventpublic void intervalRemoved(ListDataEvent e)
intervalRemoved
in interface ListDataListener
e
- the eventpublic void contentsChanged(ListDataEvent e)
contentsChanged
in interface ListDataListener
e
- the event
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |