de.matthiasmann.twl.model
Class AbstractTableSelectionModel

java.lang.Object
  extended by de.matthiasmann.twl.model.AbstractTableSelectionModel
All Implemented Interfaces:
TableSelectionModel
Direct Known Subclasses:
DefaultTableSelectionModel, TableSingleSelectionModel

public abstract class AbstractTableSelectionModel
extends java.lang.Object
implements TableSelectionModel


Field Summary
protected  int anchorIndex
           
protected  int leadIndex
           
protected  java.lang.Runnable[] selectionChangeListener
           
 
Constructor Summary
protected AbstractTableSelectionModel()
           
 
Method Summary
 void addSelectionChangeListener(java.lang.Runnable cb)
           
protected  void fireSelectionChange()
           
 int getAnchorIndex()
           
 int getLeadIndex()
           
 void removeSelectionChangeListener(java.lang.Runnable cb)
           
 void rowsDeleted(int index, int count)
           
 void rowsInserted(int index, int count)
           
 void setAnchorIndex(int index)
           
 void setLeadIndex(int index)
           
protected  void updateLeadAndAnchor(int index0, int index1)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.matthiasmann.twl.model.TableSelectionModel
addSelection, clearSelection, getFirstSelected, getLastSelected, getSelection, hasSelection, invertSelection, isSelected, removeSelection, setSelection
 

Field Detail

leadIndex

protected int leadIndex

anchorIndex

protected int anchorIndex

selectionChangeListener

protected java.lang.Runnable[] selectionChangeListener
Constructor Detail

AbstractTableSelectionModel

protected AbstractTableSelectionModel()
Method Detail

getAnchorIndex

public int getAnchorIndex()
Specified by:
getAnchorIndex in interface TableSelectionModel

getLeadIndex

public int getLeadIndex()
Specified by:
getLeadIndex in interface TableSelectionModel

setAnchorIndex

public void setAnchorIndex(int index)
Specified by:
setAnchorIndex in interface TableSelectionModel

setLeadIndex

public void setLeadIndex(int index)
Specified by:
setLeadIndex in interface TableSelectionModel

addSelectionChangeListener

public void addSelectionChangeListener(java.lang.Runnable cb)
Specified by:
addSelectionChangeListener in interface TableSelectionModel

removeSelectionChangeListener

public void removeSelectionChangeListener(java.lang.Runnable cb)
Specified by:
removeSelectionChangeListener in interface TableSelectionModel

rowsDeleted

public void rowsDeleted(int index,
                        int count)
Specified by:
rowsDeleted in interface TableSelectionModel

rowsInserted

public void rowsInserted(int index,
                         int count)
Specified by:
rowsInserted in interface TableSelectionModel

fireSelectionChange

protected void fireSelectionChange()

updateLeadAndAnchor

protected void updateLeadAndAnchor(int index0,
                                   int index1)