org.crosswire.bibledesktop.book

## Class BooksComboBoxModel

- java.lang.Object
- - javax.swing.AbstractListModel
  - - org.crosswire.bibledesktop.book.BooksListModel
    - - 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.
  Author:
    Joe Walker
  See Also:
    `for license details.`, Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.crosswire.bibledesktop.book.BooksListModel

      `BooksListModel.CustomListDataListener`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected org.crosswire.jsword.book.Book` | `current` The currently selected version
    `private static long` | `serialVersionUID` Serialization ID

    - ### Fields inherited from class org.crosswire.bibledesktop.book.BooksListModel

      `books, comparator`

    - ### Fields inherited from class javax.swing.AbstractListModel

      `listenerList`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BooksComboBoxModel()` Basic Constructor
    `BooksComboBoxModel(org.crosswire.jsword.book.BookFilter filter)` Basic Constructor
    `BooksComboBoxModel(org.crosswire.jsword.book.BookFilter filter, Comparator<org.crosswire.jsword.book.Book> comparator)` Basic Constructor

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.crosswire.jsword.book.Book` | `getSelectedBook()` Get the selected Bible
    `Object` | `getSelectedItem()`
    `protected void` | `postCacheData()`
    `private void` | `readObject(ObjectInputStream is)` Serialization support.
    `void` | `setSelectedItem(Object selected)`
    `private void` | `tryInitialSelection(org.crosswire.jsword.book.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 transient org.crosswire.jsword.book.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(org.crosswire.jsword.book.BookFilter filter)

      Basic Constructor

    - #### BooksComboBoxModel

          public BooksComboBoxModel(org.crosswire.jsword.book.BookFilter filter,
                            Comparator<org.crosswire.jsword.book.Book> comparator)

      Basic Constructor

  - ### Method Detail

    - #### tryInitialSelection

          private void tryInitialSelection(org.crosswire.jsword.book.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 org.crosswire.jsword.book.Book getSelectedBook()

      Get the selected Bible
      Returns:
        A Bible

    - #### postCacheData

          protected final void postCacheData()

    - #### readObject

          private void readObject(ObjectInputStream is)
                           throws IOException,
                                  ClassNotFoundException

      Serialization support.
      Parameters:
        `is` -
      Throws:
        `IOException`
        `ClassNotFoundException`