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.jsword.passage
Class PassageEvent

    java.lang.Object
      java.util.EventObject
          org.crosswire.jsword.passage.PassageEvent

All Implemented Interfaces:
  Serializable

    public class PassageEvent

extends EventObject

Defines an event that encapsulates changes to a Passage. For many operations on a Passage, calculating the extent of the changes is hard. In these cases we default the range to the whole Bible.

Author:
  Joe Walker
See Also:
  `The GNU Lesser General Public License for details.`, Serialized Form

Nested Class Summary
`static class` | `PassageEvent.EventType` Indicates what kind of change happened to a Passage.

Field Summary
`private Verse` | `lower` The lowest numbered element to have changed
`private static long` | `serialVersionUID` Serialization ID
`private PassageEvent.EventType` | `type` The type of change
`private Verse` | `upper` The highest numbered element to have changed

Fields inherited from class java.util.EventObject
`source`

Constructor Summary
`PassageEvent(Object source, PassageEvent.EventType versesChanged, Verse lower, Verse upper)` Constructs a PassageEvent object.

Method Summary
`Verse` | `getLowerIndex()` Returns the lower index of the range.
`PassageEvent.EventType` | `getType()` Returns the event type.
`Verse` | `getUpperIndex()` Returns the upper index of the range.

Methods inherited from class java.util.EventObject
`getSource, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### type

    private PassageEvent.EventType type

  The type of change

### lower

    private Verse lower

  The lowest numbered element to have changed

### upper

    private Verse upper

  The highest numbered element to have changed

### serialVersionUID

    private static final long serialVersionUID

  Serialization ID

  See Also:
    Constant Field Values

Constructor Detail

### PassageEvent

    public PassageEvent(Object source,
                        PassageEvent.EventType versesChanged,
                        Verse lower,
                        Verse upper)

  Constructs a PassageEvent object.

  Parameters:
    `source` - the source Object (typically `this`)
    `versesChanged` - an int specifying VERSES_CHANGED, VERSES_ADDED, VERSES_REMOVED
    `lower` - an int specifying the bottom of a range
    `upper` - an int specifying the top of a range

Method Detail

### getType

    public PassageEvent.EventType getType()

  Returns the event type. The possible values are:
  - VERSES_CHANGED
  - VERSES_ADDED
  - VERSES_REMOVED

  Returns:
    an int representing the type value

### getLowerIndex

    public Verse getLowerIndex()

  Returns the lower index of the range. For a single element, this value is the same as that returned by `getUpperIndex()`.

  Returns:
    an int representing the lower index value

### getUpperIndex

    public Verse getUpperIndex()

  Returns the upper index of the range. For a single element, this value is the same as that returned by `getLowerIndex()`.

  Returns:
    an int representing the upper index value

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