com.eliad.model
Class AbstractGridSelectionModel

java.lang.Object
  |
  +--com.eliad.model.AbstractGenericModel
        |
        +--com.eliad.model.AbstractGridSelectionModel

public abstract class AbstractGridSelectionModel
extends com.eliad.model.AbstractGenericModel
implements GridSelectionModel

Base implementation of handling listeners for GridSelectionModel.

Version:
1.0 03/26/00
Author:
Patrick Mérissert-Coffinières
See Also:
GridSelectionModel, Serialized Form

Fields inherited from class com.eliad.model.AbstractGenericModel
listeners_
 
Constructor Summary
AbstractGridSelectionModel()
           
 
Method Summary
 void addGridSelectionListener(GridSelectionListener l)
          Adds a listener to the list that's notified each time a change to the selection model occurs.
 void fireAnchorChanged(java.awt.Point oldAnchor, java.awt.Point newAnchor)
           
 void fireSelectionRangeChanged(java.awt.Rectangle range)
          Notifies GridSelectionListeners that the value of the selection in the range range has changed.
 int getFirstSelectedColumn()
          Retrieves the index of the first row where at least one cell is selected.
 int getFirstSelectedRow()
          Retrieves the index of the first row where at least one cell is selected.
 int getLastSelectedColumn()
          Retrieves the index of the last column where at least one cell is selected.
 int getLastSelectedRow()
          Retrieves the index of the last row where at least one cell is selected.
protected  void propagateAnchorChanged(GridSelectionEvent e)
           
protected  void propagateRangeChanged(GridSelectionEvent e)
           
 void removeGridSelectionListener(GridSelectionListener l)
          Removes a listener from the list that's notified each time a change to the selection model occurs.
 
Methods inherited from class com.eliad.model.AbstractGenericModel
getListenerCount, getListeners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractGridSelectionModel

public AbstractGridSelectionModel()
Method Detail

getFirstSelectedRow

public int getFirstSelectedRow()
Retrieves the index of the first row where at least one cell is selected.
Specified by:
getFirstSelectedRow in interface GridSelectionModel

getFirstSelectedColumn

public int getFirstSelectedColumn()
Retrieves the index of the first row where at least one cell is selected.
Specified by:
getFirstSelectedColumn in interface GridSelectionModel

getLastSelectedRow

public int getLastSelectedRow()
Retrieves the index of the last row where at least one cell is selected.
Specified by:
getLastSelectedRow in interface GridSelectionModel

getLastSelectedColumn

public int getLastSelectedColumn()
Retrieves the index of the last column where at least one cell is selected.
Specified by:
getLastSelectedColumn in interface GridSelectionModel

addGridSelectionListener

public void addGridSelectionListener(GridSelectionListener l)
Adds a listener to the list that's notified each time a change to the selection model occurs.
Specified by:
addGridSelectionListener in interface GridSelectionModel
Parameters:
l - the GridSelectionListener

removeGridSelectionListener

public void removeGridSelectionListener(GridSelectionListener l)
Removes a listener from the list that's notified each time a change to the selection model occurs.
Specified by:
removeGridSelectionListener in interface GridSelectionModel
Parameters:
l - the GridSelectionListener

fireSelectionRangeChanged

public void fireSelectionRangeChanged(java.awt.Rectangle range)
Notifies GridSelectionListeners that the value of the selection in the range range has changed.

fireAnchorChanged

public void fireAnchorChanged(java.awt.Point oldAnchor,
                              java.awt.Point newAnchor)

propagateRangeChanged

protected void propagateRangeChanged(GridSelectionEvent e)

propagateAnchorChanged

protected void propagateAnchorChanged(GridSelectionEvent e)