|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.AbstractListModel | +--net.sourceforge.wohenchan.PagingListModel
PagingListModel is a ListModel decorator which presents a subset of the list elements in the underlying (decorated) model.
Field Summary | |
private javax.swing.ListModel |
m_inner
This is the underlying ListModel which actually contains the data. |
private int |
m_pagedSize
The size of the listmodel presented by this class. |
private int |
m_startIndex
The index, into the underlying ListModel (m_inner) to present as element 0 to the outside world by this class. |
Fields inherited from class javax.swing.AbstractListModel |
listenerList |
Constructor Summary | |
PagingListModel(javax.swing.ListModel inner)
Constructs a PagingListModel |
Method Summary | |
protected void |
fireContentsChanged(java.lang.Object source,
int index0,
int index1)
This is overridden in an attempt to fix wohenchan bug 117453. |
protected void |
fireIntervalAdded(java.lang.Object source,
int index0,
int index1)
This is overridden in an attempt to fix wohenchan bug 117453. |
protected void |
fireIntervalRemoved(java.lang.Object source,
int index0,
int index1)
This is overridden in an attempt to fix wohenchan bug 117453. |
java.lang.Object |
getElementAt(int index)
|
int |
getSize()
|
void |
setPagedSize(int size)
Sets the max size of the model that this class presents to the outside world. |
void |
setStartIndex(int index)
Sets the index, in the underlying list model, which is used as element 0 for this list model. |
Methods inherited from class javax.swing.AbstractListModel |
addListDataListener, getListDataListeners, getListeners, removeListDataListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private javax.swing.ListModel m_inner
private int m_startIndex
private int m_pagedSize
Constructor Detail |
public PagingListModel(javax.swing.ListModel inner)
inner
- WHERE (inner != null) the underlying ListModel
which actually contains the data.Method Detail |
public int getSize()
public java.lang.Object getElementAt(int index)
public void setStartIndex(int index)
index
- the index, into the underlying (decorated) list
model which is returned as element 0.public void setPagedSize(int size)
size
- the maximum size that this list model will return
from getSize()protected void fireContentsChanged(java.lang.Object source, int index0, int index1)
fireContentsChanged
in class javax.swing.AbstractListModel
protected void fireIntervalAdded(java.lang.Object source, int index0, int index1)
fireIntervalAdded
in class javax.swing.AbstractListModel
protected void fireIntervalRemoved(java.lang.Object source, int index0, int index1)
fireIntervalRemoved
in class javax.swing.AbstractListModel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |