public class RangeListModel extends AbstractListModel
for license details.
,
Serialized FormModifier and Type | Field and Description |
---|---|
private List<org.crosswire.jsword.passage.Key> |
ranges
The list of ranges in the passage.
|
private org.crosswire.jsword.passage.Passage |
ref
The Passage that we are modeling
|
private org.crosswire.jsword.passage.RestrictionType |
restrict
If we are modeling in groups, do we break at chapter/book boundaries
|
private static long |
serialVersionUID
Serialization ID
|
listenerList
Constructor and Description |
---|
RangeListModel(org.crosswire.jsword.passage.RestrictionType theRestriction)
Create a RangeListModel specifying whether to list the ranges bounded by
Chapter or not at all.
|
Modifier and Type | Method and Description |
---|---|
Object |
getElementAt(int index)
Returns the value at the specified index.
|
org.crosswire.jsword.passage.Passage |
getPassage()
Accessor for the current passage
|
org.crosswire.jsword.passage.RestrictionType |
getRestriction()
Return the current Range Restriction
|
int |
getSize()
Returns the length of the list.
|
private void |
refresh() |
void |
setPassage(org.crosswire.jsword.passage.Passage newRef)
Accessor for the current passage
|
void |
setRestriction(org.crosswire.jsword.passage.RestrictionType restrict)
Change the restrictions we are using.
|
addListDataListener, fireContentsChanged, fireIntervalAdded, fireIntervalRemoved, getListDataListeners, getListeners, removeListDataListener
private org.crosswire.jsword.passage.Passage ref
private List<org.crosswire.jsword.passage.Key> ranges
private org.crosswire.jsword.passage.RestrictionType restrict
private static final long serialVersionUID
public RangeListModel(org.crosswire.jsword.passage.RestrictionType theRestriction)
theRestriction
- Do we chop at chapter boundariespublic void setRestriction(org.crosswire.jsword.passage.RestrictionType restrict)
RestrictType.NONE
, or RestrictType.CHAPTER
restrict
- The new restrictionspublic org.crosswire.jsword.passage.RestrictionType getRestriction()
public int getSize()
public Object getElementAt(int index)
index
- The index (based at 0) of the element to fetchpublic final void setPassage(org.crosswire.jsword.passage.Passage newRef)
public org.crosswire.jsword.passage.Passage getPassage()
private void refresh()