org.crosswire.bibledesktop.book
Class DriversComboBoxModel

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

public class DriversComboBoxModel
extends DriversListModel
implements ComboBoxModel

The DriverModels class implements ComboBoxModel by extending the DriverListModel.

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: DriversComboBoxModel.java,v 1.3 2005/03/06 20:21:36 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.DriversListModel
DriversListModel.BibleListCellRenderer
 
Field Summary
protected  Object current
          The currently selected version
private static long serialVersionUID
          Serialization ID
 
Fields inherited from class org.crosswire.bibledesktop.book.DriversListModel
drivers, NO_FOCUS_BORDER, SMALL_ICON
 
Fields inherited from class javax.swing.AbstractListModel
listenerList
 
Constructor Summary
DriversComboBoxModel(boolean includeRo)
          Basic Constructor
 
Method Summary
 BookDriver getSelectedDriver()
          Given an item, work out the name of the Driver that it represents
 Object getSelectedItem()
           
 void setSelectedItem(Object current)
           
 
Methods inherited from class org.crosswire.bibledesktop.book.DriversListModel
getDriver, getDriverName, getElementAt, getIndexOf, getListCellRenderer, getSize
 
Methods inherited from class javax.swing.AbstractListModel
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
 
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 Object current
The currently selected version


serialVersionUID

private static final long serialVersionUID
Serialization ID

See Also:
Constant Field Values
Constructor Detail

DriversComboBoxModel

public DriversComboBoxModel(boolean includeRo)
Basic Constructor

Method Detail

setSelectedItem

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

getSelectedItem

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

getSelectedDriver

public BookDriver getSelectedDriver()
Given an item, work out the name of the Driver that it represents

Returns:
A Driver

Copyright ? 2003-2004