org.jdesktop.binding
Class SelectionModelEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.jdesktop.binding.SelectionModelEvent
All Implemented Interfaces:
java.io.Serializable

public class SelectionModelEvent
extends java.util.EventObject

Event for tracking changes in the selected rows in a SelectionModel

Author:
Richard Bair
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
SelectionModelEvent(SelectionModel source, int firstIndex, int lastIndex)
          Create a new SelectionModelEvent.
 
Method Summary
 int getFirstIndex()
           
 int getLastIndex()
           
 
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
 

Constructor Detail

SelectionModelEvent

public SelectionModelEvent(SelectionModel source,
                           int firstIndex,
                           int lastIndex)
Create a new SelectionModelEvent. The range between firstIndex and lastIndex inclusive (firstIndex is less than or equal to lastIndex) represents a change in selection state of those rows. At least one of the rows within the range will have changed. A good SelectionModel implementation will keep the range as small as possible.

Parameters:
source - the SelectionModel that fired this event
firstIndex - the first index that changed
lastIndex - the last index that changed, lastIndex >= firstIndex
Method Detail

getFirstIndex

public int getFirstIndex()
Returns:
the first row whose selection value may have changed, where zero is the first row

getLastIndex

public int getLastIndex()
Returns:
the last row whose selection value may have changed, where zero is the last row


Copyright © 2005 Sun Microsystems All Rights Reserved.