public class SpreadSheetNodeSelectionListener implements ListSelectionListener {
public SpreadSheetNodeSelectionListener(){
}
public void valueChanged(ListSelectionEvent lse){
if (lse.getValueIsAdjusting()) return; //it's not a final event
SpreadSheetListSelectionModel listSelectionModel = (SpreadSheetListSelectionModel)lse.getSource();
SpreadSheetSelectionModel selectionModel=listSelectionModel.getSelectionModel();
CommonSpreadSheet spreadSheet=(CommonSpreadSheet)selectionModel.getTable();
CommonSpreadSheetModel model=(CommonSpreadSheetModel)spreadSheet.getModel();
int[] rows=spreadSheet.getSelectedRows();
List nodes=new ArrayList(rows.length);