JIDE 3.5.15

com.jidesoft.list
Interface ListModelWrapper

All Known Implementing Classes:
DefaultListModelWrapper, DefaultPageListModel, FilterableGroupableListModel, FilterableListModel, LuceneFilterableListModel, SortableGroupableListModel, SortableListModel

public interface ListModelWrapper

ListModelWrapper is a wrapper around list model which is referred as the actual list model or underlying list model. It can be used to provide a different view to the actual model. A typical use case is SortableListModel.


Method Summary
 int getActualIndexAt(int index)
          Gets the actual row index in the underlying list that corresponds the specified row index.
 ListModel getActualModel()
          Gets the underlying list model.
 int getIndexAt(int actualIndex)
          Gets the visual row index representing the specified actual row.
 int[] getIndexes()
          Gets the indexes that maps from the visual row index to the actual row index.
 void setActualModel(ListModel model)
          Sets the actual list model.
 void setIndexes(int[] indexes)
          Sets the indexes of the row mapping.
 

Method Detail

getActualModel

ListModel getActualModel()
Gets the underlying list model.

Returns:
the underlying list model.

setActualModel

void setActualModel(ListModel model)
Sets the actual list model.

Parameters:
model - the list model.

getActualIndexAt

int getActualIndexAt(int index)
Gets the actual row index in the underlying list that corresponds the specified row index.

Parameters:
index -
Returns:
the actual row. If the actual row doesn't exist, return -1.

getIndexAt

int getIndexAt(int actualIndex)
Gets the visual row index representing the specified actual row.

Parameters:
actualIndex -
Returns:
the visual row index. -1 if there is no visual row representing it.

getIndexes

int[] getIndexes()
Gets the indexes that maps from the visual row index to the actual row index.

Returns:
the indexes.

setIndexes

void setIndexes(int[] indexes)
Sets the indexes of the row mapping. We exposed this method to allow quick access to the underlying indexes. The method won't fire any table events. So once you change the indexes, you need to fire corresponding table event so that table can update itself.

Parameters:
indexes -

JIDE 3.5.15