|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.AbstractListModel
org.crosswire.bibledesktop.book.BooksListModel
public class BooksListModel
BooksListModel creates a Swing ListModel from the available Bibles. I would normally implement BooksListener in an inner class however doing that would stop me calling fireInterval*() in AbstractListModel because that is a protected method and the inner class is neither in the same package or a sub class.
for license details.
The copyright to this program is held by it's authors.
,
Serialized FormNested Class Summary | |
---|---|
(package private) class |
BooksListModel.CustomListDataListener
So we can get a handle on what Bibles there are |
Field Summary | |
---|---|
private BookList |
bookList
The list of books in this tree |
protected List |
books
The array of versions. |
private BookFilter |
filter
The filter used to choose Bibles |
private BooksListModel.CustomListDataListener |
listener
The listener |
private static Logger |
log
The log stream |
private static long |
serialVersionUID
Serialization ID |
Fields inherited from class javax.swing.AbstractListModel |
---|
listenerList |
Constructor Summary | |
---|---|
BooksListModel()
Basic constructor |
|
BooksListModel(BookFilter filter)
Basic constructor |
|
BooksListModel(BookFilter filter,
BookList bookList)
Basic constructor |
Method Summary | |
---|---|
void |
addListDataListener(ListDataListener li)
|
protected void |
cacheData()
Setup the data-stores of the current Bibles and drivers |
protected void |
fireContentsChanged(Object source,
int index0,
int index1)
|
Object |
getElementAt(int index)
|
int |
getIndexOf(Object test)
Returns the index-position of the specified object in the list. |
int |
getSize()
|
void |
removeListDataListener(ListDataListener li)
|
void |
setFilter(BookFilter filter)
|
Methods inherited from class javax.swing.AbstractListModel |
---|
fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private transient BookList bookList
private transient BookFilter filter
private transient BooksListModel.CustomListDataListener listener
protected List books
private static final Logger log
private static final long serialVersionUID
Constructor Detail |
---|
public BooksListModel()
public BooksListModel(BookFilter filter)
public BooksListModel(BookFilter filter, BookList bookList)
Method Detail |
---|
public int getSize()
public Object getElementAt(int index)
public int getIndexOf(Object test)
test
- the object to find
public void setFilter(BookFilter filter)
filter
- public void addListDataListener(ListDataListener li)
addListDataListener
in interface ListModel
addListDataListener
in class AbstractListModel
public void removeListDataListener(ListDataListener li)
removeListDataListener
in interface ListModel
removeListDataListener
in class AbstractListModel
protected final void cacheData()
protected void fireContentsChanged(Object source, int index0, int index1)
fireContentsChanged
in class AbstractListModel
|
Copyright ? 2003-2006 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |