de.matthiasmann.twl.model
Interface TableSelectionModel

All Known Implementing Classes:
AbstractTableSelectionModel, DefaultTableSelectionModel, TableSingleSelectionModel

public interface TableSelectionModel


Method Summary
 void addSelection(int index0, int index1)
          Adds the given interval (both indices inclusive) to the selection.
 void addSelectionChangeListener(java.lang.Runnable cb)
           
 void clearSelection()
           
 int getAnchorIndex()
           
 int getFirstSelected()
           
 int getLastSelected()
           
 int getLeadIndex()
           
 int[] getSelection()
           
 boolean hasSelection()
           
 void invertSelection(int index0, int index1)
          Inverts the given interval (both indices inclusive) in the selection.
 boolean isSelected(int index)
           
 void removeSelection(int index0, int index1)
          Removes the given interval (both indices inclusive) from the selection.
 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)
           
 void setSelection(int index0, int index1)
          Sets the selection to the given interval (both indices inclusive).
 

Method Detail

rowsInserted

void rowsInserted(int index,
                  int count)

rowsDeleted

void rowsDeleted(int index,
                 int count)

clearSelection

void clearSelection()

setSelection

void setSelection(int index0,
                  int index1)
Sets the selection to the given interval (both indices inclusive). Single selection should use index1.

Parameters:
index0 - the start index of the interval.
index1 - the end index of the interval.

addSelection

void addSelection(int index0,
                  int index1)
Adds the given interval (both indices inclusive) to the selection. Single selection should use index1.

Parameters:
index0 - the start index of the interval.
index1 - the end index of the interval.

invertSelection

void invertSelection(int index0,
                     int index1)
Inverts the given interval (both indices inclusive) in the selection. Single selection should use index1.

Parameters:
index0 - the start index of the interval.
index1 - the end index of the interval.

removeSelection

void removeSelection(int index0,
                     int index1)
Removes the given interval (both indices inclusive) from the selection. Single selection should clear the selection.

Parameters:
index0 - the start index of the interval.
index1 - the end index of the interval.

getLeadIndex

int getLeadIndex()

getAnchorIndex

int getAnchorIndex()

setLeadIndex

void setLeadIndex(int index)

setAnchorIndex

void setAnchorIndex(int index)

isSelected

boolean isSelected(int index)

hasSelection

boolean hasSelection()

getFirstSelected

int getFirstSelected()

getLastSelected

int getLastSelected()

getSelection

int[] getSelection()

addSelectionChangeListener

void addSelectionChangeListener(java.lang.Runnable cb)

removeSelectionChangeListener

void removeSelectionChangeListener(java.lang.Runnable cb)