Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.crosswire.bibledesktop.passage
Class RangeListModel

    java.lang.Object
      javax.swing.AbstractListModel
          org.crosswire.bibledesktop.passage.RangeListModel

All Implemented Interfaces:
  Serializable, ListModel

    public class RangeListModel

extends AbstractListModel

The RangeListModel class gives access to a Passage as a list of ranges via a ListModel.

Author:
  DM Smith [dmsmith555 at yahoo dot com]
See Also:
  `for license details. The copyright to this program is held by it's authors.`, Serialized Form

Field Summary
`private List` | `ranges` The list of ranges in the passage.
`private Passage` | `ref` The Passage that we are modelling
`private RestrictionType` | `restrict` If we are modelling in groups, do we break at chapter/book boundries
`private static long` | `serialVersionUID` Serialization ID

Fields inherited from class javax.swing.AbstractListModel
`listenerList`

Constructor Summary
`RangeListModel(RestrictionType theRestriction)` Create a RangeListModel specifying whether to list the ranges bounded by Chapter or not at all.

Method Summary
`Object` | `getElementAt(int index)` Returns the value at the specified index.
`Passage` | `getPassage()` Accessor for the current passage
`RestrictionType` | `getRestriction()` Return the current Range Restriction
`int` | `getSize()` Returns the length of the list.
`private void` | `refresh()`
`void` | `setPassage(Passage newRef)` Accessor for the current passage
`void` | `setRestriction(RestrictionType restrict)` Change the restrictions we are using.

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`

Field Detail

### ref

    private Passage ref

  The Passage that we are modelling

### ranges

    private List ranges

  The list of ranges in the passage.

### restrict

    private RestrictionType restrict

  If we are modelling in groups, do we break at chapter/book boundries

### serialVersionUID

    private static final long serialVersionUID

  Serialization ID

  See Also:
    Constant Field Values

Constructor Detail

### RangeListModel

    public RangeListModel(RestrictionType theRestriction)

  Create a RangeListModel specifying whether to list the ranges bounded by Chapter or not at all.

  Parameters:
    `theRestriction` - Do we chop at chapter boundries

Method Detail

### setRestriction

    public void setRestriction(RestrictionType restrict)

  Change the restrictions we are using. Must be one of: `RestrictType.NONE`, or `RestrictType.CHAPTER`

  Parameters:
    `restrict` - The new restrictions

### getRestriction

    public RestrictionType getRestriction()

  Return the current Range Restriction

### getSize

    public int getSize()

  Returns the length of the list.

  Returns:
    The number of verses/ranges in the list

### getElementAt

    public Object getElementAt(int index)

  Returns the value at the specified index.

  Parameters:
    `index` - The index (based at 0) of the element to fetch
  Returns:
    The required verse/range

### setPassage

    public final void setPassage(Passage newRef)

  Accessor for the current passage

### getPassage

    public Passage getPassage()

  Accessor for the current passage

### refresh

    private void refresh()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright ¨ 2003-2007
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD