org.crosswire.bibledesktop.book
Class BooksComboBoxModel

java.lang.Object
  extended by javax.swing.AbstractListModel
      extended by org.crosswire.bibledesktop.book.BooksListModel
          extended by org.crosswire.bibledesktop.book.BooksComboBoxModel
All Implemented Interfaces:
Serializable, ComboBoxModel, ListModel

public class BooksComboBoxModel
extends BooksListModel
implements ComboBoxModel

The BibleModels class implements a number of swing DataModels and gives access to the list of current Bibles.

Distribution Licence:
JSword is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
The License is available on the internet here, or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
The copyright to this program is held by it's authors.

Version:
$Id: BooksComboBoxModel.java,v 1.7 2005/03/19 01:57:09 dmsmith Exp $
Author:
Joe Walker [joe at eireneh dot com]
See Also:
Licence, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.crosswire.bibledesktop.book.BooksListModel
BooksListModel.CustomListDataListener
 
Field Summary
protected  Book current
          The currently selected version
private static long serialVersionUID
          Serialization ID
 
Fields inherited from class org.crosswire.bibledesktop.book.BooksListModel
books
 
Fields inherited from class javax.swing.AbstractListModel
listenerList
 
Constructor Summary
BooksComboBoxModel()
          Basic Constructor
BooksComboBoxModel(BookFilter filter)
          Basic Constructor
 
Method Summary
 Book getSelectedBook()
          Get the selected Bible
 Object getSelectedItem()
           
protected  void postCacheData()
           
 void setSelectedItem(Object selected)
           
private  void tryInitialSelection(Book book)
           
 
Methods inherited from class org.crosswire.bibledesktop.book.BooksListModel
addListDataListener, cacheData, fireContentsChanged, getElementAt, getIndexOf, getSize, removeListDataListener, setFilter
 
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
 
Methods inherited from interface javax.swing.ListModel
addListDataListener, getElementAt, getSize, removeListDataListener
 

Field Detail

current

protected Book current
The currently selected version


serialVersionUID

private static final long serialVersionUID
Serialization ID

See Also:
Constant Field Values
Constructor Detail

BooksComboBoxModel

public BooksComboBoxModel()
Basic Constructor


BooksComboBoxModel

public BooksComboBoxModel(BookFilter filter)
Basic Constructor

Method Detail

tryInitialSelection

private void tryInitialSelection(Book book)
Parameters:
book -

setSelectedItem

public void setSelectedItem(Object selected)
Specified by:
setSelectedItem in interface ComboBoxModel

getSelectedItem

public Object getSelectedItem()
Specified by:
getSelectedItem in interface ComboBoxModel

getSelectedBook

public Book getSelectedBook()
Get the selected Bible

Returns:
A Bible

postCacheData

protected final void postCacheData()

Copyright ? 2003-2004